]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
TCP: remove wrong INSIST(csock->recv_cb != NULL)
authorArtem Boldariev <artem@boldariev.com>
Mon, 15 Jan 2024 15:03:50 +0000 (17:03 +0200)
committerArtem Boldariev <artem@boldariev.com>
Tue, 16 Jan 2024 13:01:26 +0000 (15:01 +0200)
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

index 548f9bf65033bf9b8c8dca5ad1e6e664b7157a07..f7fe1a415b85b15a254b8339f2c34e0d21e9cbd5 100644 (file)
@@ -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.
         */