summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVladimír Čunát <vladimir.cunat@nic.cz>2024-03-25 14:49:36 +0100
committerOto Šťáva <oto.stava@nic.cz>2024-03-27 09:59:26 +0100
commit34013144590b3837efab3a5992a28649b6c78601 (patch)
tree8e11a84c56813d0fb0f7322bc04ee221d10364ad /lib
parentlib/rules: fix RPZ if SOA is repated, as usual in AXFR output (diff)
downloadknot-resolver-34013144590b3837efab3a5992a28649b6c78601.tar.xz
knot-resolver-34013144590b3837efab3a5992a28649b6c78601.zip
lib/rules: avoid RPZ overriding the root SOA
Diffstat (limited to 'lib')
-rw-r--r--lib/rules/zonefile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rules/zonefile.c b/lib/rules/zonefile.c
index 6c260d77..cfd2bc27 100644
--- a/lib/rules/zonefile.c
+++ b/lib/rules/zonefile.c
@@ -144,6 +144,8 @@ static bool owner_relativize(zs_scanner_t *s)
apex = d->origin_soa = knot_dname_copy(s->r_owner, d->pool);
}
d->seen_record = true;
+ if (s->r_type == KNOT_RRTYPE_SOA)
+ return false; // otherwise we'd insert `. SOA` record
const int labels = knot_dname_in_bailiwick(s->r_owner, apex);
if (labels < 0) {