From 034b5febb16d8547f60774271f70795a0e78de6f Mon Sep 17 00:00:00 2001 From: Artem Boldariev Date: Tue, 7 Mar 2023 23:16:11 +0200 Subject: [PATCH] DoT: remove TLS-related kludge in isc__nmsocket_connecttimeout_cb() 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 | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/isc/netmgr/netmgr.c b/lib/isc/netmgr/netmgr.c index ee96138721..74d326aa0a 100644 --- a/lib/isc/netmgr/netmgr.c +++ b/lib/isc/netmgr/netmgr.c @@ -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. */