]> git.ipfire.org Git - thirdparty/bind9.git/commit
Change NSEC3 and NSEC3PARAM struct fields to use isc_region_t
authorOndřej Surý <ondrej@isc.org>
Tue, 24 Feb 2026 12:30:56 +0000 (13:30 +0100)
committerOndřej Surý <ondrej@isc.org>
Thu, 2 Apr 2026 14:53:18 +0000 (16:53 +0200)
commit14cebe4d61469f9db179071a8ec759a835cf3d23
tree87949e3d70764f187e145d0a087073a8f431cf5e
parentae739daec27a3ff8d6fbec8127fb638c0fd46d67
Change NSEC3 and NSEC3PARAM struct fields to use isc_region_t

Replace the separate pointer+length field pairs in dns_rdata_nsec3_t
(salt/salt_length, next/next_length, typebits/len) and
dns_rdata_nsec3param_t (salt/salt_length) with isc_region_t.  This
makes the structs self-describing and eliminates a class of
length-mismatch bugs.

The dns_zone_setnsec3param() signature is updated to take
isc_region_t *salt instead of separate saltlen and salt arguments.

Function signatures for dns_nsec3_addnsec3, dns_db_getnsec3parameters,
and related internal functions still use separate pointer+length pairs
and should be updated in a follow-up.
15 files changed:
bin/dnssec/dnssec-signzone.c
bin/named/server.c
bin/named/zoneconf.c
lib/dns/include/dns/zone.h
lib/dns/nsec3.c
lib/dns/qpzone.c
lib/dns/rdata/generic/nsec3_50.c
lib/dns/rdata/generic/nsec3_50.h
lib/dns/rdata/generic/nsec3param_51.c
lib/dns/rdata/generic/nsec3param_51.h
lib/dns/validator.c
lib/dns/zone.c
lib/dns/zoneverify.c
tests/dns/nsec3param_test.c
tests/dns/private_test.c