From 0246ea14c4734b6fad6d2b2fce84d3ee59be6ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Witold=20Kr=C4=99cicki?= Date: Thu, 5 Jul 2018 13:50:54 +0200 Subject: [PATCH] Make resolver tests more civilized --- bin/tests/system/resolver/ans3/ans.pl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bin/tests/system/resolver/ans3/ans.pl b/bin/tests/system/resolver/ans3/ans.pl index 097ced4b2d..d603b07fe1 100644 --- a/bin/tests/system/resolver/ans3/ans.pl +++ b/bin/tests/system/resolver/ans3/ans.pl @@ -93,6 +93,11 @@ for (;;) { $packet->push("answer", new Net::DNS::RR($qname . " 300 CNAME goodcname.example.org")); + } elsif ($qname =~ /^nodata\.example\.net$/i) { + $packet->header->aa(1); + } elsif ($qname =~ /^nxdomain\.example\.net$/i) { + $packet->header->aa(1); + $packet->header->rcode(NXDOMAIN); } elsif ($qname eq "cname.sub.example.org") { $packet->push("answer", new Net::DNS::RR($qname . @@ -109,6 +114,10 @@ for (;;) { new Net::DNS::RR($qname . " 300 A 192.0.2.1")); } elsif ($qname eq "foo.glue-in-answer.example.org") { $packet->push("answer", new Net::DNS::RR($qname . " 300 A 192.0.2.1")); + } elsif ($qname eq "ns.example.net") { + $packet->push("answer", + new Net::DNS::RR($qname . + " 300 A 10.53.0.3")); } else { $packet->push("answer", new Net::DNS::RR("www.example.com 300 A 1.2.3.4")); }