]> 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 14:09:39 +0000 (16:09 +0200)
commitb9fc0e595b5f907654bc241efee5f942d57b7903
tree50ba94c464b79a4019671fa74230b8c10a124852
parent0a5ba57116857779680d76fe4b20e125f3bc3b71
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.
bin/tests/system/nsupdate/tests_tcp_self_sig.py