From 05619362726a8f4644af4b515c4ed02a5e84539f Mon Sep 17 00:00:00 2001 From: Aram Sargsyan Date: Wed, 5 Mar 2025 09:58:32 +0000 Subject: [PATCH] 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(). (cherry picked from commit 6cd9e4f67c48ce9178600aba7fe91266b914e713) --- lib/dns/zone.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 2b1f8393cb..fc170f3bb5 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -18312,7 +18312,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;