From: Ondřej Surý Date: Fri, 6 Nov 2020 12:11:08 +0000 (+0100) Subject: netmgr: Always load the result from async socket X-Git-Tag: v9.17.7~19^2~3 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=050258bda4a45faf18baaf3879a9da160d2230fe;p=thirdparty%2Fbind9.git netmgr: Always load the result from async socket Because we use result earlier for setting the loadbalancing on the socket, we could be left with a ISC_R_NOTIMPLEMENTED value stored in the variable and when the UDP connection would succeed, we would errorneously return this value instead of ISC_R_SUCCESS. --- diff --git a/lib/isc/netmgr/udp.c b/lib/isc/netmgr/udp.c index aa058ce06d6..05e490a6f27 100644 --- a/lib/isc/netmgr/udp.c +++ b/lib/isc/netmgr/udp.c @@ -841,9 +841,7 @@ isc_nm_udpconnect(isc_nm_t *mgr, isc_nmiface_t *local, isc_nmiface_t *peer, isc__nm_uvreq_put(&req, sock); } - if (atomic_load(&sock->result) != ISC_R_SUCCESS) { - result = atomic_load(&sock->result); - } + result = atomic_load(&sock->result); isc__nmsocket_detach(&tmp);