From: Ondřej Surý Date: Thu, 13 May 2021 13:04:48 +0000 (+0200) Subject: Fix the outgoing UDP socket selection on Windows X-Git-Tag: v9.17.14~60^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cd413234f752b22da2658a7530d6996e03740c83;p=thirdparty%2Fbind9.git Fix the outgoing UDP socket selection on Windows The outgoing UDP socket selection would pick unintialized children socket on Windows, because we have more netmgr workers than we have listening sockets. This commit fixes the selection by keeping the outgoing socket the same, so it's always run on existing socket. --- diff --git a/lib/isc/netmgr/udp.c b/lib/isc/netmgr/udp.c index ba61418ce08..b8a40d99f56 100644 --- a/lib/isc/netmgr/udp.c +++ b/lib/isc/netmgr/udp.c @@ -481,12 +481,17 @@ isc__nm_udp_send(isc_nmhandle_t *handle, const isc_region_t *region, */ INSIST(sock->parent != NULL); +#if defined(WIN32) + /* On Windows, we have only a single listening listener */ + rsock = sock; +#else if (isc__nm_in_netthread()) { ntid = isc_nm_tid(); } else { ntid = sock->tid; } rsock = &sock->parent->children[ntid]; +#endif } send: