mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
Test reconfig after adding inline signed zones won't crash named
This test ensures that named won't crash after many inline-signed zones are added to configurarion, followed by a rndc reconfig.
This commit is contained in:
@@ -27,6 +27,8 @@ rm -f ns2/internal/K*
|
||||
rm -f ns2/internal/inline.db.jbk
|
||||
rm -f ns2/internal/inline.db.signed
|
||||
rm -f ns2/internal/inline.db.signed.jnl
|
||||
rm -f ns2/zones.conf
|
||||
rm -f ns2/db.* ns2/K*
|
||||
rm -f dig.out.external dig.out.internal
|
||||
rm -f ns*/named.lock
|
||||
rm -f ns*/managed-keys.bind* ns*/*.mkeys*
|
||||
|
33
bin/tests/system/views/ns2/named3.conf.in
Normal file
33
bin/tests/system/views/ns2/named3.conf.in
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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;
|
||||
port @PORT@;
|
||||
pid-file "named.pid";
|
||||
listen-on { 10.53.0.2; };
|
||||
listen-on-v6 { none; };
|
||||
recursion no;
|
||||
notify no;
|
||||
};
|
||||
|
||||
key rndc_key {
|
||||
secret "1234abcd8765";
|
||||
algorithm hmac-sha256;
|
||||
};
|
||||
|
||||
controls {
|
||||
inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
|
||||
};
|
||||
|
||||
include "zones.conf";
|
@@ -132,5 +132,46 @@ test "$int" != "$ext" || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "verifying adding of multiple inline zones followed by reconfiguration works"
|
||||
|
||||
[ ! -f ns2/zones.conf ] && touch ns2/zones.conf
|
||||
copy_setports ns2/named3.conf.in ns2/named.conf
|
||||
|
||||
for i in `seq 1 50`; do
|
||||
ret=0
|
||||
zone_name=`printf "example%03d.com" $i`
|
||||
|
||||
# Add a new zone to the configuration.
|
||||
cat >> ns2/zones.conf << EOF
|
||||
zone "${zone_name}" {
|
||||
type master;
|
||||
file "db.${zone_name}";
|
||||
dnssec-dnskey-kskonly yes;
|
||||
auto-dnssec maintain;
|
||||
inline-signing yes;
|
||||
};
|
||||
EOF
|
||||
|
||||
# Create a master file for the zone.
|
||||
cat > "ns2/db.${zone_name}" <<EOF
|
||||
\$TTL 86400
|
||||
@ IN SOA localhost. hostmaster.localhost (
|
||||
1612542642 ; serial
|
||||
12H ; refresh
|
||||
1H ; retry
|
||||
2w ; expiry
|
||||
1h ; minimum
|
||||
)
|
||||
|
||||
IN NS localhost
|
||||
localhost IN A 127.0.0.1
|
||||
EOF
|
||||
|
||||
$KEYGEN -q -Kns2 -fk -aecdsa256 ${zone_name} > /dev/null
|
||||
$RNDCCMD 10.53.0.2 reconfig || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; break; fi
|
||||
done # end for #
|
||||
status=`expr $status + $ret`
|
||||
|
||||
echo_i "exit status: $status"
|
||||
[ $status -eq 0 ] || exit 1
|
||||
|
Reference in New Issue
Block a user