summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2020-06-02 07:30:47 -0700
committerBob Halley <halley@dnspython.org>2020-06-02 07:30:47 -0700
commit014f40b8bcbf141e307d695620f3adc9ad2b24c6 (patch)
treeaf0eacff2d90ad9ac2d9c3b6d1a5d12fe58384e4
parent842dc3a0c1466126d547a05b32abd29150ecc1d2 (diff)
downloaddnspython-014f40b8bcbf141e307d695620f3adc9ad2b24c6.tar.gz
bail out early on ShortHeader
-rw-r--r--tests/nanonameserver.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/nanonameserver.py b/tests/nanonameserver.py
index a14d925..850d748 100644
--- a/tests/nanonameserver.py
+++ b/tests/nanonameserver.py
@@ -136,6 +136,9 @@ class Server(threading.Thread):
r = None
try:
q = dns.message.from_wire(wire)
+ except dns.message.ShortHeader:
+ # There is no hope of answering this one!
+ return None
except Exception:
# Try to make a FORMERR using just the question section.
try: