From: Artem Boldariev Date: Mon, 15 Jan 2024 15:03:50 +0000 (+0200) Subject: TCP: remove wrong INSIST(csock->recv_cb != NULL) X-Git-Tag: v9.19.22~81^2~1 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=dffb11f2c09becac47b7ace628891abdcde19e00;p=thirdparty%2Fbind9.git 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. --- diff --git a/lib/isc/netmgr/tcp.c b/lib/isc/netmgr/tcp.c index 548f9bf6503..f7fe1a415b8 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. */