]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Check that 'provide-zoneversion no;' works
authorMark Andrews <marka@isc.org>
Thu, 29 Aug 2024 00:09:34 +0000 (10:09 +1000)
committerMark Andrews <marka@isc.org>
Mon, 24 Mar 2025 22:16:09 +0000 (22:16 +0000)
bin/tests/system/digdelv/ns2/named.conf.in
bin/tests/system/digdelv/tests.sh

index c9fdcd79ab798183f211e9f99ff45ca67cde1ada..47b0449ffb35b8b3d099fdc6d3fe103606f7f0fd 100644 (file)
@@ -36,4 +36,5 @@ zone "example" {
 zone "example.tld" {
        type primary;
        file "example.tld.db";
+       provide-zoneversion no;
 };
index 6122fa1132c2193d3a0feb3c95823cb32682a386..60f5e1f022a0345d8a0f6fe307c6af442331293c 100644 (file)
@@ -810,6 +810,15 @@ if [ -x "$DIG" ]; then
   if [ $ret -ne 0 ]; then echo_i "failed"; fi
   status=$((status + ret))
 
+  n=$((n + 1))
+  echo_i "checking dig +zoneversion to a authoritative server with zoneversion disabled ($n)"
+  ret=0
+  dig_with_opts @10.53.0.2 +zoneversion a.example.tld >dig.out.test$n 2>&1 || ret=1
+  grep "status: NOERROR" dig.out.test$n >/dev/null || ret=1
+  grep "; ZONEVERSION:" dig.out.test$n >/dev/null && ret=1
+  if [ $ret -ne 0 ]; then echo_i "failed"; fi
+  status=$((status + ret))
+
   if [ $HAS_PYYAML -ne 0 ]; then
     n=$((n + 1))
     echo_i "checking dig +yaml +zoneversion to a authoritative server ($n)"