--- /dev/null
+; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+;
+; SPDX-License-Identifier: MPL-2.0
+;
+; 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 https://mozilla.org/MPL/2.0/.
+;
+; See the COPYRIGHT file distributed with this work for additional
+; information regarding copyright ownership.
+
+$TTL 999999
+bar.com. IN SOA hostmaster.nominum.com. a.root-servers.nil. (
+ 2000042100
+ 600
+ 600
+ 1200
+ 600
+ )
+ IN NS ns
+ns IN A 10.53.0.1
+foo IN NS ns.somehost.com.
DNS IN A 207.88.32.2
$ORIGIN MERCHANTWARE.CON.
NS1 IN A 209.170.142.34
+$ORIGIN somehost.com.
+ns IN A 10.53.0.3
file "example.db";
};
+zone "bar.com" {
+ type primary;
+ file "bar.com.db";
+};
+
zone "flushtest.example" {
type primary;
file "flushtest.db";
--m record -c named.conf -d 3 -D cacheclean-ns2 -g -T maxcachesize=2097152
+-m record -c named.conf -d 99 -D cacheclean-ns2 -g -T maxcachesize=2097152
--- /dev/null
+; Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+;
+; SPDX-License-Identifier: MPL-2.0
+;
+; 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 https://mozilla.org/MPL/2.0/.
+;
+; See the COPYRIGHT file distributed with this work for additional
+; information regarding copyright ownership.
+
+$TTL 999999
+foo.bar.com. IN SOA hostmaster.nominum.com. a.root-servers.nil. (
+ 2000042100
+ 600
+ 600
+ 1200
+ 600
+ )
+ IN NS ns.somehost.com.
+gee IN A 9.9.9.9
--- /dev/null
+/*
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+ *
+ * SPDX-License-Identifier: MPL-2.0
+ *
+ * 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 https://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.3;
+ notify-source 10.53.0.3;
+ transfer-source 10.53.0.3;
+ port @PORT@;
+ pid-file "named.pid";
+ listen-on { 10.53.0.3; };
+ listen-on-v6 { none; };
+ allow-transfer { any; };
+ recursion no;
+ dnssec-validation no;
+ notify yes;
+ check-integrity no;
+ minimal-responses no;
+};
+
+zone "foo.bar.com" {
+ type primary;
+ file "foo.bar.com.db";
+};
+
n=$((n + 1))
echo_i "check flushtree clears adb correctly ($n)"
ret=0
-load_cache
+# Because the resolver is parent centric, no NS will be used from ADB using
+# flushtest.example, as the NS is in-domain. So force an NS lookup using
+# foo.bar.com domain.
+$DIG @10.53.0.2 -p ${PORT} A gee.foo.bar.com >/dev/null
dump_cache
mv ns2/named_dump.db.test$n ns2/named_dump.db.test$n.a
sed -n '/plain success\/timeout/,/Unassociated entries/p' \
ns2/named_dump.db.test$n.a >sed.out.$n.a
grep 'plain success/timeout' sed.out.$n.a >/dev/null 2>&1 || ret=1
-grep 'ns.flushtest.example' sed.out.$n.a >/dev/null 2>&1 || ret=1
-$RNDC $RNDCOPTS flushtree flushtest.example || ret=1
+grep 'ns.somehost.com.' sed.out.$n.a >/dev/null 2>&1 || ret=1
+$RNDC $RNDCOPTS flushtree com. || ret=1
dump_cache
mv ns2/named_dump.db.test$n ns2/named_dump.db.test$n.b
sed -n '/plain success\/timeout/,/Unassociated entries/p' \
ns2/named_dump.db.test$n.b >sed.out.$n.b
grep 'plain success/timeout' sed.out.$n.b >/dev/null 2>&1 || ret=1
-grep 'ns.flushtest.example' sed.out.$n.b >/dev/null 2>&1 && ret=1
+grep 'ns.somehost.com.' sed.out.$n.b >/dev/null 2>&1 && ret=1
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))