]> 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>
Tue, 20 Jul 2021 05:17:32 +0000 (15:17 +1000)
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 a30577139a8bd89717506abc25ba1531a5d351ce..0a86ea7d16e20798688701e74f4b902790ab21c1 100644 (file)
@@ -101,6 +101,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