--- /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 {
+ port @PORT@;
+ pid-file "named.pid";
+ listen-on { 10.53.0.2; };
+ listen-on-v6 { fd92:7065:b8e:ffff::2; };
+ dnssec-validation no;
+};
+
+zone "ipv4-only-servers" {
+ type secondary;
+ primaries { 10.53.0.3; };
+};
+
+zone "ipv6-only-servers" {
+ type secondary;
+ primaries { fd92:7065:b8e:ffff::2; };
+};
copy_setports ns2/named-alt2.conf.in ns2/named-alt2.conf
copy_setports ns2/named-alt3.conf.in ns2/named-alt3.conf
copy_setports ns2/named-alt4.conf.in ns2/named-alt4.conf
+copy_setports ns2/named-alt5.conf.in ns2/named-alt5.conf
mkdir ns2/nope
chmod 555 ns2/nope
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status + ret))
+n=$((n + 1))
+echo_i "checking that named log missing IPv4 primaries in -4 mode ($n)"
+ret=0
+INSTANCE_NAME="missing-primaries-ipv4-only-mode"
+testpid=$(run_named ns2 named$n.run -c named-alt5.conf -D "${INSTANCE_NAME}" -4)
+test -n "$testpid" || ret=1
+retry_quiet 60 check_named_log "running$" ns2/named$n.run || ret=1
+grep "IPv6 disabled and no IPv4 primaries" ns2/named$n.run >/dev/null || ret=1
+kill_named ns2/named.pid || ret=1
+test -n "$testpid" && retry_quiet 10 check_pid $testpid || ret=1
+if [ $ret -ne 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
+n=$((n + 1))
+echo_i "checking that named log missing IPv6 primaries in -6 mode ($n)"
+ret=0
+INSTANCE_NAME="missing-primaries-ipv4-only-mode"
+testpid=$(run_named ns2 named$n.run -c named-alt5.conf -D "${INSTANCE_NAME}" -6)
+test -n "$testpid" || ret=1
+retry_quiet 60 check_named_log "running$" ns2/named$n.run || ret=1
+grep "IPv4 disabled and no IPv6 primaries" ns2/named$n.run >/dev/null || ret=1
+kill_named ns2/named.pid || ret=1
+test -n "$testpid" && retry_quiet 10 check_pid $testpid || ret=1
+if [ $ret -ne 0 ]; then echo_i "failed"; fi
+status=$((status + ret))
+
n=$((n + 1))
echo_i "verifying that named switches UID ($n)"
if [ "$(id -u)" -eq 0 ]; then