--- /dev/null
+/*
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * See the COPYRIGHT file distributed with this work for additional
+ * information regarding copyright ownership.
+ */
+
+options {
+ query-source address 10.53.0.2;
+ notify-source 10.53.0.2;
+ transfer-source 10.53.0.2;
+ recursion no;
+ port @PORT@;
+ pid-file "named.pid";
+ listen-on { 10.53.0.2; };
+ listen-on-v6 { none; };
+ notify no;
+ minimal-responses yes;
+};
+
+zone "." {
+ type master;
+ file "root.db";
+};
my $qname = $questions[0]->qname;
my $qtype = $questions[0]->qtype;
- if ($qname eq "cname1.example.com") {
+ if ($qname eq "com" && $qtype eq "NS") {
+ $packet->header->aa(1);
+ $packet->push("answer", new Net::DNS::RR("com 300 NS a.root-servers.nil."));
+ } elsif ($qname eq "example.com" && $qtype eq "NS") {
+ $packet->header->aa(1);
+ $packet->push("answer", new Net::DNS::RR("example.com 300 NS a.root-servers.nil."));
+ } elsif ($qname eq "cname1.example.com") {
# Data for the "cname + other data / 1" test
$packet->push("answer", new Net::DNS::RR("cname1.example.com 300 CNAME cname1.example.com"));
$packet->push("answer", new Net::DNS::RR("cname1.example.com 300 A 1.2.3.4"));
# Data for the "cname + other data / 2" test: same RRs in opposite order
$packet->push("answer", new Net::DNS::RR("cname2.example.com 300 A 1.2.3.4"));
$packet->push("answer", new Net::DNS::RR("cname2.example.com 300 CNAME cname2.example.com"));
+ } elsif ($qname eq "org" && $qtype eq "NS") {
+ $packet->header->aa(1);
+ $packet->push("answer", new Net::DNS::RR("org 300 NS a.root-servers.nil."));
+ } elsif ($qname eq "example.org" && $qtype eq "NS") {
+ $packet->header->aa(1);
+ $packet->push("answer", new Net::DNS::RR("example.org 300 NS a.root-servers.nil."));
+ } elsif (($qname eq "baddname.example.org" || $qname eq "gooddname.example.org") && $qtype eq "NS") {
+ $packet->header->aa(1);
+ $packet->push("answer", new Net::DNS::RR("example.org 300 NS a.root-servers.nil."));
} elsif ($qname eq "www.example.org" || $qname eq "www.example.net" ||
$qname eq "badcname.example.org" ||
$qname eq "goodcname.example.org" ||
new Net::DNS::RR($qname .
" 300 AAAA 2001:db8:beef::1"));
}
+ } elsif ($qname eq "net" && $qtype eq "NS") {
+ $packet->header->aa(1);
+ $packet->push("answer", new Net::DNS::RR("net 300 NS a.root-servers.nil."));
+ } elsif ($qname eq "example.net" && $qtype eq "NS") {
+ $packet->header->aa(1);
+ $packet->push("answer", new Net::DNS::RR("example.net 300 NS a.root-servers.nil."));
} elsif ($qname eq "badcname.example.net" ||
$qname eq "goodcname.example.net") {
# Data for CNAME/DNAME filtering. We need to make one-level
# expected to be accepted regardless of the filter setting.
$packet->push("authority", new Net::DNS::RR("sub.example.org 300 NS ns.sub.example.org"));
$packet->push("additional", new Net::DNS::RR("ns.sub.example.org 300 A 10.53.0.3"));
- } elsif ($qname =~ /\.broken/) {
+ } elsif ($qname =~ /broken/) {
# Delegation to broken TLD.
$packet->push("authority", new Net::DNS::RR("broken 300 NS ns.broken"));
$packet->push("additional", new Net::DNS::RR("ns.broken 300 A 10.53.0.4"));
./bin/tests/system/additional/ns1/rt.db ZONE 2013,2016,2018
./bin/tests/system/additional/ns1/rt2.db ZONE 2013,2016,2018
./bin/tests/system/additional/ns1/srv.db ZONE 2016,2018
+./bin/tests/system/additional/ns2/named.conf.in CONF-C 2018
+./bin/tests/system/additional/ns2/root.db ZONE 2018
./bin/tests/system/additional/ns3/named.conf.in CONF-C 2017,2018
./bin/tests/system/additional/ns3/root.hint ZONE 2017,2018
./bin/tests/system/additional/setup.sh SH 2013,2016,2018