From: Otto Moerbeek Date: Mon, 27 May 2019 12:40:24 +0000 (+0200) Subject: Add some notes explaining why some validations are not relevant in the dnstap case. X-Git-Tag: dnsdist-1.4.0-beta1~13^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3f9f84c6ec04059b33f6b23999c35e1591290902;p=thirdparty%2Fpdns.git Add some notes explaining why some validations are not relevant in the dnstap case. --- diff --git a/regression-tests.recursor-dnssec/test_RecDnstap.py b/regression-tests.recursor-dnssec/test_RecDnstap.py index 0669fbc7d9..c94c1b5c2e 100644 --- a/regression-tests.recursor-dnssec/test_RecDnstap.py +++ b/regression-tests.recursor-dnssec/test_RecDnstap.py @@ -43,6 +43,9 @@ def checkDnstapBase(testinstance, dnstap, protocol, initiator): testinstance.assertEqual(dnstap.message.socket_protocol, protocol) testinstance.assertTrue(dnstap.message.HasField('socket_family')) testinstance.assertEquals(dnstap.message.socket_family, dnstap_pb2.INET) + # + # We cannot check the query address and port since we only log outgoing queries via dnstap + # #testinstance.assertTrue(dnstap.message.HasField('query_address')) #testinstance.assertEquals(socket.inet_ntop(socket.AF_INET, dnstap.message.query_address), initiator) testinstance.assertTrue(dnstap.message.HasField('response_address')) @@ -59,6 +62,10 @@ def checkDnstapQuery(testinstance, dnstap, protocol, query, initiator='127.0.0.1 testinstance.assertTrue(dnstap.message.HasField('query_time_nsec')) testinstance.assertTrue(dnstap.message.HasField('query_message')) + # + # We cannot compare the incoming query with the outgoing one + # The IDs and some other fields will be different + # wire_message = dns.message.from_wire(dnstap.message.query_message) #testinstance.assertEqual(wire_message, query)