2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00

[9.20] fix: dev: 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()`.

Closes #5215

Backport of MR !10222

Merge branch 'backport-5215-assert-in-dns_remote_curraddr-fix-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10223
This commit is contained in:
Arаm Sаrgsyаn
2025-03-05 14:41:54 +00:00

View File

@@ -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;