]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix a bug in dns_zone_getprimaryaddr()
authorAram Sargsyan <aram@isc.org>
Thu, 27 Feb 2025 11:52:30 +0000 (11:52 +0000)
committerArаm Sаrgsyаn <aram@isc.org>
Fri, 28 Feb 2025 15:33:37 +0000 (15:33 +0000)
commit7293cb0612e9362ad78f5c318b767a4f8ce16451
tree36b51ef19f90fe8bfa29348653183c74cb4f62a2
parent67d37a365e201875860aa72a25bb7ef21375184a
Fix a bug in dns_zone_getprimaryaddr()

When all the addresses were already iterated over, the
dns_remote_curraddr() function asserts. So before calling it,
dns_zone_getprimaryaddr() now checks the address list using the
dns_remote_done() function. This also means that instead of
returning 'isc_sockaddr_t' it now returns 'isc_result_t' and
writes the primary's address into the provided pointer only when
returning success.
bin/named/statschannel.c
lib/dns/include/dns/zone.h
lib/dns/zone.c