]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Handle multiple NSEC3PARAM records in tests
authorMark Andrews <marka@isc.org>
Fri, 22 Dec 2023 00:55:39 +0000 (11:55 +1100)
committerMark Andrews <marka@isc.org>
Tue, 2 Jan 2024 22:25:43 +0000 (09:25 +1100)
When transitioning from one NSEC3 chain to another it is legal for
there to be multiple complete chains in the zone with multiple
NSEC3PARAM records.  Handle this intermediate state by checking
for the expected length in the loop.

bin/tests/system/dnssec/tests.sh

index 6a295b5a231f0167a5cdc5fc27991b381aa04c81..bdaac667e0f14ea8a4f878dca4ffb0deb96e416d 100644 (file)
@@ -2720,7 +2720,7 @@ rndccmd 10.53.0.3 signing -nsec3param 1 0 0 auto inline.example >/dev/null 2>&1
 rndccmd 10.53.0.3 status >/dev/null || ret=1
 for i in 1 2 3 4 5 6 7 8 9 10; do
   salt=$(dig_with_opts +nodnssec +short nsec3param inline.example. @10.53.0.3 | awk '{print $4}')
-  [ -n "$salt" ] && [ "$salt" != "-" ] && break
+  [ "$salt" != "-" ] && [ "${#salt}" -eq 16 ] && break
   echo_i "sleeping ...."
   sleep 1
 done
@@ -2737,7 +2737,7 @@ rndccmd 10.53.0.3 signing -nsec3param 1 0 0 auto inline.example >/dev/null 2>&1
 rndccmd 10.53.0.3 status >/dev/null || ret=1
 for i in 1 2 3 4 5 6 7 8 9 10; do
   salt=$(dig_with_opts +nodnssec +short nsec3param inline.example. @10.53.0.3 | awk '{print $4}')
-  [ -n "$salt" ] && [ "$salt" != "$oldsalt" ] && break
+  [ "$salt" != "$oldsalt" ] && [ "${#salt}" -eq 16 ] && break
   echo_i "sleeping ...."
   sleep 1
 done