]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add test that checks NSEC3PARAM TTL
authorMatthijs Mekking <matthijs@isc.org>
Wed, 12 Oct 2022 14:23:11 +0000 (16:23 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Fri, 11 Nov 2022 11:06:33 +0000 (12:06 +0100)
The TTL should be equal to the SOA MINIMUM by default.

bin/tests/system/nsec3/tests.sh

index 0abbbce71c93bf38e52a2ceca49ac55cf1278df8..1c66f0858c5b5e667ad91212c786fb4584c8f005 100644 (file)
@@ -275,6 +275,14 @@ set_nsec3param "0" "0" "0"
 set_key_default_values "KEY1"
 echo_i "initial check zone ${ZONE}"
 check_nsec3
+# Test that NSEC3PARAM TTL is equal to SOA MINIMUM.
+n=$((n+1))
+echo_i "check TTL of NSEC3PARAM in zone $ZONE ($n)"
+ret=0
+dig_with_opts +noquestion "@${SERVER}" "$ZONE" NSEC3PARAM > "dig.out.test$n" || ret=1
+grep "${ZONE}\..*3600.*IN.*NSEC3PARAM" "dig.out.test$n" > /dev/null || ret=1
+test "$ret" -eq 0 || echo_i "failed"
+status=$((status+ret))
 
 # Zone: nsec3-dynamic.kasp.
 set_zone_policy "nsec3-dynamic.kasp" "nsec3" 1 3600