2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

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.
This commit is contained in:
Artem Boldariev 2024-01-15 17:03:50 +02:00
parent 84e7e5d5df
commit dffb11f2c0

View 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.
*/