mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-29 05:43:20 -04:00
Check that restored catalog zone works
Using a restored catalog zone excercised a use-after-free bug. The test checks that the use-after-free bug is gone and is just a reasonable behaviour check in its own right.
This commit is contained in:
parent
b1086a5561
commit
bca84c8601
1 changed files with 39 additions and 0 deletions
|
|
@ -2515,6 +2515,45 @@ rndccmd 10.53.0.2 reconfig || ret=1
|
|||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
#########################################################################
|
||||
|
||||
nextpart ns2/named.run >/dev/null
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "Adding a dom19.example. to primary via RNDC ($n)"
|
||||
ret=0
|
||||
# enough initial content for IXFR response when TXT record is added below
|
||||
echo "@ 3600 IN SOA . . 1 3600 3600 3600 3600" > ns1/dom19.example.db
|
||||
echo "@ 3600 IN NS invalid." >> ns1/dom19.example.db
|
||||
echo "foo 3600 IN TXT some content here" >> ns1/dom19.example.db
|
||||
echo "bar 3600 IN TXT some content here" >> ns1/dom19.example.db
|
||||
echo "xxx 3600 IN TXT some content here" >> ns1/dom19.example.db
|
||||
echo "yyy 3600 IN TXT some content here" >> ns1/dom19.example.db
|
||||
rndccmd 10.53.0.1 addzone dom19.example. in default '{ type primary; file "dom19.example.db"; allow-transfer { key tsig_key; }; allow-update { any; }; notify explicit; also-notify { 10.53.0.2; }; };' || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "add an entry to the restored catalog zone ($n)"
|
||||
ret=0
|
||||
$NSUPDATE -d <<END >> nsupdate.out.test$n 2>&1 || ret=1
|
||||
server 10.53.0.1 ${PORT}
|
||||
update add 09da0a318e5333a9a7f6c14c385d69f6933e8b72.zones.catalog1.example. 3600 IN PTR dom19.example.
|
||||
update add label1.primaries.ext.09da0a318e5333a9a7f6c14c385d69f6933e8b72.zones.catalog1.example. 3600 IN A 10.53.0.1
|
||||
update add label1.primaries.ext.09da0a318e5333a9a7f6c14c385d69f6933e8b72.zones.catalog1.example. 3600 IN TXT "tsig_key"
|
||||
send
|
||||
END
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
n=$((n+1))
|
||||
echo_i "waiting for secondary to sync up ($n)"
|
||||
ret=0
|
||||
wait_for_message ns2/named.run "catz: adding zone 'dom19.example' from catalog 'catalog1.example'" &&
|
||||
wait_for_message ns2/named.run "transfer of 'dom19.example/IN/default' from 10.53.0.1#${PORT}: Transfer status: success" || ret=1
|
||||
if [ $ret -ne 0 ]; then echo_i "failed"; fi
|
||||
status=$((status+ret))
|
||||
|
||||
##########################################################################
|
||||
n=$((n+1))
|
||||
echo_i "Adding a domain tls1.example. to primary via RNDC ($n)"
|
||||
|
|
|
|||
Loading…
Reference in a new issue