aboutsummaryrefslogtreecommitdiff
path: root/ziguard.awk
diff options
context:
space:
mode:
Diffstat (limited to 'ziguard.awk')
-rw-r--r--ziguard.awk11
1 files changed, 6 insertions, 5 deletions
diff --git a/ziguard.awk b/ziguard.awk
index 7d6f7c99c952..6888c27156b9 100644
--- a/ziguard.awk
+++ b/ziguard.awk
@@ -114,15 +114,16 @@ DATAFORM != "main" {
}
}
-# If a Link line is followed by a Zone line for the same data, comment
+# If a Link line is followed by a Link or Zone line for the same data, comment
# out the Link line. This can happen if backzone overrides a Link
-# with a Zone.
-/^Link/ {
- linkline[$3] = NR
-}
+# with a Zone or a different Link.
/^Zone/ {
sub(/^Link/, "#Link", line[linkline[$2]])
}
+/^Link/ {
+ sub(/^Link/, "#Link", line[linkline[$3]])
+ linkline[$3] = NR
+}
{ line[NR] = $0 }