]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Check that removal of nonexistent PTR and SRV records work
authorMark Andrews <marka@isc.org>
Mon, 28 Aug 2023 01:40:46 +0000 (11:40 +1000)
committerMark Andrews <marka@isc.org>
Tue, 29 Aug 2023 14:48:50 +0000 (00:48 +1000)
There was a bug in rr_exists that caused it to fail when the
name didn't exist in the zone.

bin/tests/system/nsupdate/tests.sh

index 8c2c7174370fcdbdfa2bfca981d9ecaf8794cb06..c92e2b0a46516c06d3556e8fbda239b07610a4e9 100755 (executable)
@@ -462,6 +462,28 @@ fi
 
 echo_i "end RT #482 regression test"
 
+n=$((n + 1))
+ret=0
+echo_i "remove nonexistent PTR record ($n)"
+$NSUPDATE -k ns1/ddns.key -d << EOF > nsupdate.out.test$n 2>&1 || ret=1
+server 10.53.0.1 ${PORT}
+zone example.nil.
+update delete nonexistent.example.nil. 0 IN PTR foo.
+send
+EOF
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
+
+n=$((n + 1))
+ret=0
+echo_i "remove nonexistent SRV record ($n)"
+$NSUPDATE -k ns1/ddns.key -d << EOF > nsupdate.out.test$n 2>&1 || ret=1
+server 10.53.0.1 ${PORT}
+zone example.nil.
+update delete nonexistent.example.nil. 0 IN SRV 0 0 0 foo.
+send
+EOF
+[ $ret = 0 ] || { echo_i "failed"; status=1; }
+
 n=$((n + 1))
 ret=0
 echo_i "start NSEC3PARAM changes via UPDATE on a unsigned zone test ($n)"