]> 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>
Tue, 19 Dec 2023 22:05:59 +0000 (22:05 +0000)
Check each delta for the NSEC3 -> NSEC private record addition
as it may be added in the second delta.

bin/tests/system/autosign/tests.sh

index 1741589dcf334456d6e15d1f9cfae855f27549d1..ba67b3d93dabf6a7fdf6a468f7721d1692f428da 100755 (executable)
@@ -1327,9 +1327,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