mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
TLS: Avoid accessing listener socket flags from other threads
This commit ensures that the flags inside a TLS listener socket object (and associated worker) are accessed when accepting a connection only from within the context of the dedicated thread, but not other worker threads.
This commit is contained in:
@@ -687,10 +687,9 @@ tlslisten_acceptcb(isc_nmhandle_t *handle, isc_result_t result, void *cbarg) {
|
|||||||
REQUIRE(VALID_NMSOCK(tlslistensock));
|
REQUIRE(VALID_NMSOCK(tlslistensock));
|
||||||
REQUIRE(tlslistensock->type == isc_nm_tlslistener);
|
REQUIRE(tlslistensock->type == isc_nm_tlslistener);
|
||||||
|
|
||||||
if (isc__nmsocket_closing(handle->sock) ||
|
if (isc__nm_closing(handle->sock->worker)) {
|
||||||
isc__nmsocket_closing(tlslistensock) ||
|
return (ISC_R_SHUTTINGDOWN);
|
||||||
!atomic_load(&tlslistensock->listening))
|
} else if (isc__nmsocket_closing(handle->sock)) {
|
||||||
{
|
|
||||||
return (ISC_R_CANCELED);
|
return (ISC_R_CANCELED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user