--- /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 max_stale_ttl = max_stale_ttl | default(3600) %}
+{% set stale_answer_ttl = stale_answer_ttl | default(4) %}
+{% set stale_refresh_time = stale_refresh_time | default(30) %}
+{% set stale_test_zone = stale_test_zone | default(False) %}
+
+key rndc_key {
+ secret "1234abcd8765";
+ algorithm @DEFAULT_HMAC@;
+};
+
+controls {
+ inet 10.53.0.1 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
+};
+
+options {
+ query-source address 10.53.0.1;
+ notify-source 10.53.0.1;
+ transfer-source 10.53.0.1;
+ port @PORT@;
+ pid-file "named.pid";
+ listen-on { 10.53.0.1; };
+ listen-on-v6 { none; };
+ allow-transfer { any; };
+ recursion yes;
+ dnssec-validation no;
+ max-stale-ttl @max_stale_ttl@;
+ stale-answer-ttl @stale_answer_ttl@;
+ stale-answer-enable yes;
+ stale-cache-enable yes;
+{% if stale_refresh_time is not none %}
+ stale-refresh-time @stale_refresh_time@;
+{% endif %}
+ servfail-ttl 0;
+};
+
+zone "." {
+ type primary;
+ file "root.db";
+};
+
+{% if stale_test_zone %}
+zone "stale.test" {
+ type primary;
+ file "stale.test.db";
+};
+{% endif %}
--- /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 stale_refresh_time = 0 %}
+
+{% include "ns1/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 max_stale_ttl = 20 %}
+{% set stale_answer_ttl = 3 %}
+{% set stale_refresh_time = None %}
+
+{% include "ns1/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 max_stale_ttl = 20 %}
+{% set stale_answer_ttl = 3 %}
+{% set stale_refresh_time = 0 %}
+{% set stale_test_zone = True %}
+
+{% include "ns1/named.conf.j2" %}
+++ /dev/null
-#!/bin/sh
-
-# 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.
-
-. ../conf.sh
-
-copy_setports ns1/named1.conf.in ns1/named.conf
-copy_setports ns3/named.conf.in ns3/named.conf
-copy_setports ns4/named.conf.in ns4/named.conf
-copy_setports ns5/named.conf.in ns5/named.conf
-copy_setports ns6/named.conf.in ns6/named.conf
n=$((n + 1))
echo_i "updating ns1/named.conf ($n)"
ret=0
-copy_setports ns1/named2.conf.in ns1/named.conf
+cp ns1/named2.conf ns1/named.conf
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "updating ns1/named.conf ($n)"
ret=0
-copy_setports ns1/named3.conf.in ns1/named.conf
+cp ns1/named3.conf ns1/named.conf
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "updating ns1/named.conf ($n)"
ret=0
-copy_setports ns1/named4.conf.in ns1/named.conf
+cp ns1/named4.conf ns1/named.conf
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "updating ns3/named1.conf ($n)"
ret=0
-copy_setports ns3/named1.conf.in ns3/named.conf
+cp ns3/named1.conf ns3/named.conf
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "updating ns3/named3.conf ($n)"
ret=0
-copy_setports ns3/named3.conf.in ns3/named.conf
+cp ns3/named3.conf ns3/named.conf
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "updating ns3/named4.conf ($n)"
ret=0
-copy_setports ns3/named4.conf.in ns3/named.conf
+cp ns3/named4.conf ns3/named.conf
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "updating ns3/named5.conf ($n)"
ret=0
-copy_setports ns3/named5.conf.in ns3/named.conf
+cp ns3/named5.conf ns3/named.conf
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "updating ns3/named6.conf ($n)"
ret=0
-copy_setports ns3/named6.conf.in ns3/named.conf
+cp ns3/named6.conf ns3/named.conf
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
n=$((n + 1))
echo_i "updating ns3/named7.conf ($n)"
ret=0
-copy_setports ns3/named7.conf.in ns3/named.conf
+cp ns3/named7.conf ns3/named.conf
if [ $ret != 0 ]; then echo_i "failed"; fi
status=$((status + ret))
echo_i "check DNS64 processing of a stale negative answer ($n)"
ret=0
# configure ns3 with dns64
-copy_setports ns3/named8.conf.in ns3/named.conf
+cp ns3/named8.conf ns3/named.conf
rndc_reload ns3 10.53.0.3
# flush cache, enable ans2 responses, make sure serve-stale is on
$RNDCCMD 10.53.0.3 flush >rndc.out.test$n.1 2>&1 || ret=1
status=$((status + ret))
# configure ns3 with stale-answer-client-timeout 0 and a delegated zone
-copy_setports ns3/named9.conf.in ns3/named.conf
+cp ns3/named9.conf ns3/named.conf
rndc_reload ns3 10.53.0.3
n=$((n + 1))