]> git.ipfire.org Git - thirdparty/bind9.git/commit
Add regression test for SIG covers being dropped in dns_diff_apply
authorOndřej Surý <ondrej@isc.org>
Thu, 16 Apr 2026 09:16:40 +0000 (11:16 +0200)
committerOndřej Surý <ondrej@isc.org>
Fri, 17 Apr 2026 17:24:13 +0000 (19:24 +0200)
commitbc771b033a3ad25f2d9d2a7aad034fa78d3c1343
treee0f1895017b1a854ae826992e57abb83380c59e3
parent2c2533774c98bdbffd5f12ca43b6fb2683f25d92
Add regression test for SIG covers being dropped in dns_diff_apply

rdata_covers() in lib/dns/diff.c tests `type == dns_rdatatype_rrsig`
instead of dns_rdatatype_issig(), so for a legacy SIG (24) rdata it
returns 0 and the covered type is discarded on the dynamic-update /
IXFR path.  The zone DB then files every SIG rdataset under typepair
(SIG, 0) instead of (SIG, covered_type), and a follow-up add with a
different covers field but a different TTL collides at that bucket,
trips DNS_DBADD_EXACTTTL in qpzone, returns DNS_R_NOTEXACT, and comes
back to the client as SERVFAIL.

The new test adds a PTR to establish the node (tcp-self requires the
client IP's reverse form to equal the owner), then two SIG updates
with different covers and different TTLs; on a buggy build the second
update is SERVFAIL and named logs `dns_diff_apply: .../SIG/IN: add
not exact`.  The test is expected to pass once rdata_covers() is
switched to dns_rdatatype_issig(), matching the fix already adopted
for dns__db_findrdataset() on this branch and the helper pattern used
in master.c, xfrout.c, and qpcache.c.

(cherry picked from commit b9fc0e595b5f907654bc241efee5f942d57b7903)
bin/tests/system/nsupdate/tests_tcp_self_sig.py