* information regarding copyright ownership.
*/
+{% set allow_query_blackhole = allow_query_blackhole | default(False) %}
+{% set bad_dlz = bad_dlz | default(False) %}
+{% set catalog4 = catalog4 | default(False) %}
+{% set catalog5 = catalog5 | default(False) %}
+{% set duplicate_zone = duplicate_zone | default(False) %}
+
include "../../_common/rndc.key";
controls {
notify no;
notify-delay 0;
recursion no;
-#T5 allow-query { 10.53.0.99; };
serial-query-rate 100;
dnssec-validation no;
+
+{% if allow_query_blackhole %}
+ allow-query { 10.53.0.99; };
+{% endif %}
+
};
/*
default-masters { 10.53.0.1; }
min-update-interval 1s
zone-directory "nonexistent";
-#T1 zone "catalog4.example"
-#T1 min-update-interval 1s
-#T1 default-masters { 10.53.0.1; };
-#T2 zone "catalog5.example"
-#T2 min-update-interval 1s
-#T2 default-primaries { 10.53.0.1; };
+
+{% if catalog4 %}
+ zone "catalog4.example"
+ min-update-interval 1s
+ default-masters { 10.53.0.1; };
+{% endif %}
+
+{% if catalog5 %}
+ zone "catalog5.example"
+ min-update-interval 1s
+ default-primaries { 10.53.0.1; };
+{% endif %}
+
zone "catalog6.example"
min-update-interval 1s
default-primaries { 10.53.0.1; };
in-memory yes;
};
+{% if bad_dlz %}
# A faulty dlz configuration to check if named and catz survive a certain class
# of failed configuration attempts (see GL #3060).
# We use "dlz" because the dlz processing code is located in an ideal place in
# the view configuration function for the test to cover the view reverting code.
-#T3 dlz "bad-dlz" {
-#T3 database "dlopen bad-dlz.so example.org";
-#T3 };
+ dlz "bad-dlz" {
+ database "dlopen bad-dlz.so example.org";
+ };
+{% endif %}
zone "dom-existing.example" {
type primary;
primaries { 10.53.0.1; };
};
+{% if duplicate_zone %}
# When the following zone configuration is enabled, "dom3.example" should
# already exist as a member of "catalog1.example", and named should be able
# to deal with that situation (see GL #3911). Make sure that this duplicate
# zone comes after the the "catalog1.example" zone in the configuration file.
-#T4 zone "dom3.example" {
-#T4 type secondary;
-#T4 file "dom2.example.db";
-#T4 };
+ zone "dom3.example" {
+ type secondary;
+ file "dom2.example.db";
+ };
+{% endif %}
# No "version" property
zone "catalog-bad1.example" {
--- /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.
+ */
+
+{% include "ns2/named.conf.j2" %}
--- /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.
+ */
+
+{% set bad_dlz = True %}
+
+{% include "ns2/named.conf.j2" %}
--- /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.
+ */
+
+{% set duplicate_zone = True %}
+
+{% include "ns2/named.conf.j2" %}
--- /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.
+ */
+
+{% set allow_query_blackhole = True %}
+
+{% include "ns2/named.conf.j2" %}
--- /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.
+ */
+
+{% set catalog4 = True %}
+
+{% include "ns2/named.conf.j2" %}
--- /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.
+ */
+
+{% set catalog5 = True %}
+
+{% include "ns2/named.conf.j2" %}
. ../conf.sh
-copy_setports ns1/named.conf.in ns1/named.conf
-copy_setports ns2/named1.conf.in ns2/named.conf
-copy_setports ns3/named.conf.in ns3/named.conf
-copy_setports ns4/named.conf.in ns4/named.conf
-
cp -f ns1/catalog.example.db.in ns1/catalog0.example.db
cp -f ns1/catalog.example.db.in ns1/catalog1.example.db
cp -f ns3/catalog.example.db.in ns3/catalog2.example.db
n=$((n + 1))
echo_i "reconfiguring secondary - checking if catz survives a certain class of failed reconfiguration attempts ($n)"
ret=0
-sed -e "s/^#T3//" <ns2/named1.conf.in >ns2/named.conf.tmp
-copy_setports ns2/named.conf.tmp ns2/named.conf
+cp ns2/named2.conf ns2/named.conf
$RNDC -c ../_common/rndc.conf -s 10.53.0.2 -p "${CONTROLPORT}" reconfig >/dev/null 2>&1 && ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "reconfiguring secondary - reverting the bad configuration ($n)"
ret=0
-copy_setports ns2/named1.conf.in ns2/named.conf
+cp ns2/named1.conf ns2/named.conf
rndccmd 10.53.0.2 reconfig || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "reconfiguring secondary - checking if catz survives another type of failed reconfiguration attempts ($n)"
ret=0
-sed -e "s/^#T4//" <ns2/named1.conf.in >ns2/named.conf.tmp
-copy_setports ns2/named.conf.tmp ns2/named.conf
+cp ns2/named3.conf ns2/named.conf
$RNDC -c ../_common/rndc.conf -s 10.53.0.2 -p "${CONTROLPORT}" reconfig >/dev/null 2>&1 && ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "reconfiguring secondary - checking if catz member zones are reconfigured ($n)"
ret=0
-sed -e "s/^#T5//" <ns2/named1.conf.in >ns2/named.conf.tmp
-copy_setports ns2/named.conf.tmp ns2/named.conf
+cp ns2/named4.conf ns2/named.conf
rndccmd 10.53.0.2 reconfig || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "reconfiguring secondary - reverting the bad configuration ($n)"
ret=0
-copy_setports ns2/named1.conf.in ns2/named.conf
+cp ns2/named1.conf ns2/named.conf
rndccmd 10.53.0.2 reconfig || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "reconfiguring secondary - adding catalog4 catalog zone ($n)"
ret=0
-sed -e "s/^#T1//g" <ns2/named1.conf.in >ns2/named.conf.tmp
-copy_setports ns2/named.conf.tmp ns2/named.conf
+cp ns2/named5.conf ns2/named.conf
rndccmd 10.53.0.2 reconfig || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "reconfiguring secondary - removing catalog4 catalog zone, adding non-existent catalog5 catalog zone ($n)"
ret=0
-sed -e "s/^#T2//" <ns2/named1.conf.in >ns2/named.conf.tmp
-copy_setports ns2/named.conf.tmp ns2/named.conf
+cp ns2/named6.conf ns2/named.conf
$RNDC -c ../_common/rndc.conf -s 10.53.0.2 -p "${CONTROLPORT}" reconfig >/dev/null 2>&1 && ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "reconfiguring secondary - removing non-existent catalog5 catalog zone ($n)"
ret=0
-copy_setports ns2/named1.conf.in ns2/named.conf
+cp ns2/named1.conf ns2/named.conf
rndccmd 10.53.0.2 reconfig || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "checking that reconfig can delete and restore catalog zone configuration ($n)"
ret=0
-copy_setports ns2/named2.conf.in ns2/named.conf
+cp ns2/named7.conf ns2/named.conf
rndccmd 10.53.0.2 reconfig || ret=1
-copy_setports ns2/named1.conf.in ns2/named.conf
+cp ns2/named1.conf ns2/named.conf
rndccmd 10.53.0.2 reconfig || ret=1
if [ $ret -ne 0 ]; then echo_i "failed"; fi
status=$((status + ret))