Commit edb1e45e authored by Alexandre's avatar Alexandre
Browse files

Revert commit 640c1041

parent 3abe8161
...@@ -314,10 +314,11 @@ def check_truncated_query(connection, opts, level=remoh.mandatory_levels["niceto ...@@ -314,10 +314,11 @@ def check_truncated_query(connection, opts, level=remoh.mandatory_levels["niceto
connection.send_and_receive(bundle, dump=connection.debug) connection.send_and_receive(bundle, dump=connection.debug)
except OpenSSL.SSL.ZeroReturnError: # This is acceptable except OpenSSL.SSL.ZeroReturnError: # This is acceptable
return True return True
except dns.exception.FormError: # This is also acceptable except dns.exception.FormError as e: # This is also acceptable
# Some DSN resolvers will echo mangled requests with # Some DSN resolvers will echo mangled requests with
# the RCODE set to FORMERR # the RCODE set to FORMERR
# so response can not be parsed in this case # so response can not be parsed in this case
print_info(e, connection.connect_to, test_name, 'Info', fd=sys.stderr)
return True return True
except remoh.ConnectionDOTException as e: except remoh.ConnectionDOTException as e:
print_info(e, connection.connect_to, test_name, 'Info', fd=sys.stderr) print_info(e, connection.connect_to, test_name, 'Info', fd=sys.stderr)
......
...@@ -58,11 +58,7 @@ class RequestDOT(Request): ...@@ -58,11 +58,7 @@ class RequestDOT(Request):
def store_response(self, rcode, data, size): def store_response(self, rcode, data, size):
self.rcode = True self.rcode = True
self.response_size = size self.response_size = size
try: self.response = dns.message.from_wire(data)
self.response = dns.message.from_wire(data)
except dns.exception.FormError as e:
self.response = "ERROR %s" % e
self.rcode = False
class RequestDOH(Request): class RequestDOH(Request):
...@@ -94,9 +90,6 @@ class RequestDOH(Request): ...@@ -94,9 +90,6 @@ class RequestDOH(Request):
if debug: if debug:
self.response += " \"%s\"" % response[:100] self.response += " \"%s\"" % response[:100]
self.success = False self.success = False
except dns.exception.FormError as e:
self.response = "ERROR %s" % e
self.success = False
else: else:
self.response = response self.response = response
else: else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment