]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
bail out early on ShortHeader
authorBob Halley <halley@dnspython.org>
Tue, 2 Jun 2020 14:30:47 +0000 (07:30 -0700)
committerBob Halley <halley@dnspython.org>
Tue, 2 Jun 2020 14:30:47 +0000 (07:30 -0700)
tests/nanonameserver.py

index a14d925967b742261c19054df6936630cc140cc4..850d748294ca2039eba49f9e127468c7b49b7476 100644 (file)
@@ -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: