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.
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
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