]> 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:42:49 +0000 (12:42 +1000)
(cherry picked from commit 0bba0ab10d59a785e214d03d3ef4c541725a1823)

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

index e89afc4465c8eb591d6843cc208aaf0f54501e17..961dc7f33fe0a0be0468513bff7d038fd561d0ec 100644 (file)
@@ -16,3 +16,4 @@ rm -f nslookup.out.test*
 rm -f */named.memstats
 rm -f */named.run
 rm -f */named.conf
+rm -f ./nsupdate.out.test*
index dc629c0be8a2adb9550650ad6c8d5fb43240ebc9..a3ebc316f7461101144819f02df60384dc7b0e59 100644 (file)
@@ -73,6 +73,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