#2064: add handling of offline service to dns, ftp and database

This commit is contained in:
Czar Echavez
2023-11-23 21:48:11 +00:00
parent bd6c27244c
commit f0fc6518a0
8 changed files with 86 additions and 9 deletions

View File

@@ -88,10 +88,14 @@ class DNSServer(Service):
:return: True if DNS request returns a valid IP, otherwise, False
"""
if not super().receive(payload=payload, session_id=session_id, **kwargs):
return False
# The payload should be a DNS packet
if not isinstance(payload, DNSPacket):
_LOGGER.debug(f"{payload} is not a DNSPacket")
return False
# cast payload into a DNS packet
payload: DNSPacket = payload
if payload.dns_request is not None: