From dffb11f2c09becac47b7ace628891abdcde19e00 Mon Sep 17 00:00:00 2001 From: Artem Boldariev Date: Mon, 15 Jan 2024 17:03:50 +0200 Subject: [PATCH] TCP: remove wrong INSIST(csock->recv_cb != NULL) This commit removes wrong INSIST() condition as the assumption that if 'csock->recv_cb != NULL' iff 'csock->statichandle != NULL' is wrong. There is no direct relation between 'csock->statichandle' and 'csock->recv_cb', as 'csock->statichandle' gets set when allocating a handle regardless of 'csock->recv_cb' not being NULL, as it is possible to attach to the handle without starting a read operation (at the very least, it is correct to start writing before reading). That condition made `cipher-suites` system test fail with crash on some platforms in FIPS mode (namely, Oracle Linux 9) despite not being related to FIPS at all. --- lib/isc/netmgr/tcp.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/isc/netmgr/tcp.c b/lib/isc/netmgr/tcp.c index 548f9bf650..f7fe1a415b 100644 --- a/lib/isc/netmgr/tcp.c +++ b/lib/isc/netmgr/tcp.c @@ -914,10 +914,6 @@ accept_connection(isc_nmsocket_t *csock) { */ isc_nmhandle_detach(&handle); - if (csock->statichandle != NULL) { - INSIST(csock->recv_cb != NULL); - } - /* * sock is now attached to the handle. */