]> git.ipfire.org Git - thirdparty/bind9.git/commit
move keystores handle from the zone to the view
authorColin Vidal <colin@isc.org>
Tue, 26 Aug 2025 13:05:55 +0000 (15:05 +0200)
committerColin Vidal <colin@isc.org>
Wed, 27 Aug 2025 08:25:20 +0000 (10:25 +0200)
commit529fd913db81a093ddb05d438afc1109cd80d5be
treee1a6d5a4abf5a21652b23db725c114258aa683a4
parent72189af7bf135c7ea84ae11d25b924f4988a9e74
move keystores handle from the zone to the view

The list of keystores is owned by the single server object
(named_g_server), but dns_zone_t has a pointer into it in order to
preserve encapsulation (lib/dns won't link to bin/named for good
reasons).

However, getting the keystores from the zone uses the zone lock whereas
this is not needed (as the pointer value doesn't depends on the zone,
and is initialized only with the same named_g_server->keystores value);
also storing an extra pointer per zone is not needed; also, there was a
logic based on the zone->secure property which was not needed (as there
is only one keystore).

The keystores pointer is now accessible and lock-free at view level,
it also simplifies a bit the various zone configuration APIs (server.c,
zoneconf.c).
bin/named/include/named/zoneconf.h
bin/named/server.c
bin/named/zoneconf.c
lib/dns/include/dns/view.h
lib/dns/include/dns/zone.h
lib/dns/update.c
lib/dns/zone.c