Skip to content

Commit b336c92

Browse files
committed
- Test for the ixfr rdata subdomain, ixfrout_deldomain.
1 parent 55649e4 commit b336c92

8 files changed

+98
-0
lines changed

doc/ChangeLog

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
check the update as failed and restart the transfer.
44
- Test for the multiple transfer failure, xfr_over_notify.
55
- Fix read of ixfr file with rdata subdomain.
6+
- Test for the ixfr rdata subdomain, ixfrout_deldomain.
67

78
25 March 2025: Wouter
89
- Fix to please sanitizer for ixfr store of data in cancelled state.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
server:
2+
logfile: "/dev/stderr"
3+
xfrdfile: xfrd.state
4+
zonesdir: ""
5+
username: ""
6+
chroot: ""
7+
pidfile: nsd.pid
8+
zonelistfile: "zone.list"
9+
interface: 127.0.0.1
10+
xfrd-reload-timeout: 1
11+
12+
zone:
13+
name: example.com
14+
zonefile: ixfrout_deldomain.zone
15+
store-ixfr: yes
16+
create-ixfr: yes
17+
provide-xfr: 127.0.0.1 NOKEY
18+
provide-xfr: ::1 NOKEY
19+
provide-xfr: ::ffff:127.0.0.1 NOKEY
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
BaseName: ixfrout_deldomain
2+
Version: 1.0
3+
Description: test ixfr file with deldomain of rdata with subdomain of owner.
4+
CreationDate: Wed 26 Mar 16:00:00 CET 2025
5+
Maintainer: Wouter Wijngaards
6+
Category:
7+
Component:
8+
Depends:
9+
Help:
10+
Pre: ixfrout_deldomain.pre
11+
Post: ixfrout_deldomain.post
12+
Test: ixfrout_deldomain.test
13+
AuxFiles: ixfrout_deldomain.conf, ixfrout_deldomain.zone, ixfrout_deldomain.zone.ixfr
14+
Passed:
15+
Failure:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# #-- ixfrout_deldomain.post --#
2+
# source the master var file when it's there
3+
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
4+
# source the test var file when it's there
5+
[ -f .tpkg.var.test ] && source .tpkg.var.test
6+
. ../common.sh
7+
8+
# do your teardown here
9+
kill_from_pidfile nsd.pid
10+
11+
cat nsd.log
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# #-- ixfrout_deldomain.pre--#
2+
# source the master var file when it's there
3+
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
4+
# use .tpkg.var.test for in test variable passing
5+
[ -f .tpkg.var.test ] && source .tpkg.var.test
6+
PRE="../.."
7+
. ../common.sh
8+
9+
# start NSD
10+
get_random_port 1
11+
NSD_PORT=$RND_PORT
12+
echo nsd-port: $NSD_PORT
13+
14+
# share the vars
15+
echo "export NSD_PORT=$NSD_PORT" >> .tpkg.var.test
16+
17+
# replace NSD_PORT with $NSD_PORT and put it in nsd.conf
18+
cat ixfrout_deldomain.conf | sed -e "s/NSD_PORT/$NSD_PORT/g" > nsd.conf
19+
if [[ $? -ne 0 ]]; then
20+
exit 1
21+
fi
22+
TPKG_NSD="$PRE/nsd"
23+
$TPKG_NSD -c nsd.conf -p $NSD_PORT -d -V 3 2>&1 | tee nsd.log &
24+
wait_nsd_up nsd.log
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# #-- ixfrout_deldomain.test --#
2+
# source the master var file when it's there
3+
[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
4+
# use .tpkg.var.test for in test variable passing
5+
[ -f .tpkg.var.test ] && source .tpkg.var.test
6+
. ../common.sh
7+
8+
# At the start the serial is 1.
9+
dig -4 @127.0.0.1 -p $NSD_PORT example.com SOA | tee output
10+
if grep "3 3600" output; then
11+
echo "OK"
12+
else
13+
echo "NSD did not start"
14+
exit 1
15+
fi
16+
17+
exit 0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
example.com. 345600 IN SOA ns0.example.org. root.example.com. 3 3600 28800 2419200 3600
2+
a.example.com. 3600 IN A 10.0.0.1
3+
c.example.com. 3600 IN A 10.0.0.3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
; test ixfr contents
2+
example.com. 345600 IN SOA ns0.example.org. root.example.com. 3 3600 28800 2419200 3600
3+
example.com. 345600 IN SOA ns0.example.org. root.example.com. 1 3600 28800 2419200 3600
4+
b.example.com. 3600 IN A 10.0.0.1
5+
393.example.com. 86400 IN NS a.ns.393.example.com.
6+
example.com. 345600 IN SOA ns0.example.org. root.example.com. 3 3600 28800 2419200 3600
7+
c.example.com. 3600 IN A 10.0.0.3
8+
example.com. 345600 IN SOA ns0.example.org. root.example.com. 3 3600 28800 2419200 3600

0 commit comments

Comments
 (0)