]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Make resolver tests more civilized
authorWitold Kręcicki <wpk@isc.org>
Thu, 5 Jul 2018 11:50:54 +0000 (13:50 +0200)
committerWitold Kręcicki <wpk@isc.org>
Tue, 23 Oct 2018 12:15:04 +0000 (12:15 +0000)
bin/tests/system/resolver/ans3/ans.pl

index 097ced4b2dd1c2b9bb2852795fe7e341febae9ab..d603b07fe114e2d3094995faaac26d43ac2ec128 100644 (file)
@@ -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"));
        }