From 1a52dccd323ece352da073ae01c8ede62c852b17 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 22 Dec 2023 11:55:39 +1100 Subject: [PATCH] Handle multiple NSEC3PARAM records in tests 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/tests/system/dnssec/tests.sh b/bin/tests/system/dnssec/tests.sh index 6a295b5a23..bdaac667e0 100644 --- a/bin/tests/system/dnssec/tests.sh +++ b/bin/tests/system/dnssec/tests.sh @@ -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