]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
DoT: remove TLS-related kludge in isc__nmsocket_connecttimeout_cb()
authorArtem Boldariev <artem@boldariev.com>
Tue, 7 Mar 2023 21:16:11 +0000 (23:16 +0200)
committerArtem Boldariev <artem@boldariev.com>
Tue, 14 Mar 2023 16:49:29 +0000 (18:49 +0200)
This commit ensures that 'sock->tls.pending_req' is not getting
nullified during TLS connection timeout callback as it prevents the
connection callback being called when connecting was not successful.

We expect 'isc__nm_failed_connect_cb() to be called from
'isc__nm_tlsdns_shutdown()' when establishing connections was
successful, but with 'sock->tls.pending_req' nullified that will not
happen.

The code removed most likely was required in older iterations of the
NM, but to me it seems that now it does only harm. One of the well
know pronounced effects is leading to irrecoverable zone transfer
hangs via TLS.

lib/isc/netmgr/netmgr.c

index ee96138721b8728035652a0e14db0acd0e75325d..74d326aa0aaf3780c42a5f5de214dbe25d034991 100644 (file)
@@ -2017,11 +2017,6 @@ isc__nmsocket_connecttimeout_cb(uv_timer_t *timer) {
 
        isc__nmsocket_timer_stop(sock);
 
-       if (sock->tls.pending_req != NULL) {
-               REQUIRE(req == sock->tls.pending_req);
-               sock->tls.pending_req = NULL;
-       }
-
        /*
         * Mark the connection as timed out and shutdown the socket.
         */