From: Aram Sargsyan Date: Wed, 5 Mar 2025 09:58:32 +0000 (+0000) Subject: Fix a bug in get_request_transport_type() X-Git-Tag: v9.21.6~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6cd9e4f67c48ce9178600aba7fe91266b914e713;p=thirdparty%2Fbind9.git Fix a bug in get_request_transport_type() When dns_remote_done() is true, calling dns_remote_curraddr() asserts. Add a dns_remote_curraddr() check before calling dns_remote_curraddr(). --- diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 536c8f3752a..b1c0f5d8a0d 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -18461,7 +18461,9 @@ get_request_transport_type(dns_zone_t *zone) { : DNS_TRANSPORT_UDP; /* Check if the peer is forced to always use TCP. */ - if (transport_type != DNS_TRANSPORT_TCP) { + if (transport_type != DNS_TRANSPORT_TCP && + !dns_remote_done(&zone->primaries)) + { isc_result_t result; isc_sockaddr_t primaryaddr; isc_netaddr_t primaryip;