]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
check nsupdate handles UPDATE response to QUERY
authorMark Andrews <marka@isc.org>
Wed, 14 Jul 2021 21:27:55 +0000 (07:27 +1000)
committerMark Andrews <marka@isc.org>
Wed, 21 Jul 2021 02:40:47 +0000 (12:40 +1000)
(cherry picked from commit 0bba0ab10d59a785e214d03d3ef4c541725a1823)

bin/tests/system/digdelv/clean.sh
bin/tests/system/digdelv/tests.sh

index 5eeca086b3f7a149480ccad2f3864903934b69f7..14e9623d07585f7b1bb7a6bc22652515feaa5ec2 100644 (file)
@@ -28,3 +28,4 @@ rm -f ./ns2/dsset-example.
 rm -f ./ns2/example.db ./ns2/K* ./ns2/keyid ./ns2/keydata
 rm -f ./nslookup.out.test*
 rm -f ./yamlget.out.*
+rm -f ./nsupdate.out.test*
index 1c966cbc8be58525334d5f02bbb1facebe777456..d57744d1ecc4ab885dad304f14c6372fbfa96dfb 100644 (file)
@@ -102,6 +102,24 @@ if [ -x "$HOST" -a $checkupdate -eq 1 ] ; then
 
 fi
 
+if [ -x "$NSUPDATE" -a $checkupdate -eq 1 ] ; then
+
+  n=$((n+1))
+  echo_i "check nsupdate handles UPDATE response to QUERY ($n)"
+  ret=0
+  res=0
+  $NSUPDATE << EOF > nsupdate.out.test$n 2>&1 || res=$?
+server 10.53.0.7 ${PORT}
+add x.example.com 300 in a 1.2.3.4
+send
+EOF
+  test $res -eq 1 || ret=1
+  grep "invalid OPCODE in response to SOA query" nsupdate.out.test$n > /dev/null || ret=1
+  if [ $ret -ne 0 ]; then echo_i "failed"; fi
+  status=$((status+ret))
+
+fi
+
 if [ -x "$DIG" ] ; then
 
   if [ $checkupdate -eq 1 ] ; then