From 033c08c573b288ae19a0d917e497f4fe061b56bc Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Thu, 8 Jun 2017 22:17:44 +0200 Subject: [PATCH] rec: Make the Interop mockup auth answer NS queries --- regression-tests.recursor-dnssec/test_Interop.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/regression-tests.recursor-dnssec/test_Interop.py b/regression-tests.recursor-dnssec/test_Interop.py index 8d1eec2f87..74a51e6fc0 100644 --- a/regression-tests.recursor-dnssec/test_Interop.py +++ b/regression-tests.recursor-dnssec/test_Interop.py @@ -150,7 +150,13 @@ class UDPResponder(DatagramProtocol): response.edns = -1 response.additional = [] else: - answer = dns.rrset.from_text('host1.insecure-formerr.example.', 15, dns.rdataclass.IN, 'A', '127.0.0.1') - response.answer.append(answer) + if request.question[0].name == dns.name.from_text('host1.insecure-formerr.example.') and request.question[0].rdtype == dns.rdatatype.A: + answer = dns.rrset.from_text('host1.insecure-formerr.example.', 15, dns.rdataclass.IN, 'A', '127.0.0.1') + response.answer.append(answer) + elif request.question[0].name == dns.name.from_text('insecure-formerr.example.') and request.question[0].rdtype == dns.rdatatype.NS: + answer = dns.rrset.from_text('insecure-formerr.example.', 15, dns.rdataclass.IN, 'NS', 'ns1.insecure-formerr.example.') + response.answer.append(answer) + additional = dns.rrset.from_text('ns1.insecure-formerr.example.', 15, dns.rdataclass.IN, 'A', '127.0.0.2') + response.additional.append(additional) self.transport.write(response.to_wire(), address) -- 2.47.2