]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
The NSEC3 -> NSEC private record may be added later
authorMark Andrews <marka@isc.org>
Tue, 19 Dec 2023 06:50:17 +0000 (17:50 +1100)
committerMark Andrews <marka@isc.org>
Wed, 20 Dec 2023 00:13:01 +0000 (11:13 +1100)
Check each delta for the NSEC3 -> NSEC private record addition
as it may be added in the second delta.

(cherry picked from commit 80a4dff986201c6ba158ccd5f41d81196a4b6191)

bin/tests/system/autosign/tests.sh

index de7c6caa2f0df7bc636ad685fd7985014b915b2a..b90ae169f1ac297207e02bead968c3d06cbf3a71 100755 (executable)
@@ -1775,9 +1775,11 @@ status=$((status + ret))
 echo_i "check that the startup change from NSEC3 to NSEC is properly signed ($n)"
 ret=0
 $JOURNALPRINT ns3/nsec3-to-nsec.example.db.jnl \
-  | awk 'BEGIN { count=0; ok=0 }
-$1 == "del" && $5 == "SOA" { count++; if (count == 2) { if (ok) { exit(0); } else { exit(1); } } }
-$1 == "add" && $5 == "RRSIG" && $6 == "TYPE65534" { ok=1 }
+  | awk 'BEGIN { private=0; rrsig=0; ok=0 }
+$1 == "del" && $5 == "SOA" { if (private || rrsig) { if (private == rrsig) { exit(0); } else { exit(1); } } }
+$1 == "add" && $5 == "TYPE65534" { private=1 }
+$1 == "add" && $5 == "RRSIG" && $6 == "TYPE65534" { rrsig=1 }
+END { if (private || rrsig) { if (private == rrsig) { exit(0); } else { exit(1); } } else { exit (1); } }
 ' || ret=1
 n=$((n + 1))
 if [ "$ret" -ne 0 ]; then echo_i "failed"; fi