mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
TLS Stream: handle successful TLS handshake after listener shutdown
It was possible that accept callback can be called after listener shutdown. In such a case the callback pointer equals NULL, leading to segmentation fault. This commit fixes that.
This commit is contained in:
@@ -341,7 +341,7 @@ tls_try_handshake(isc_nmsocket_t *sock, isc_result_t *presult) {
|
||||
isc__nmsocket_log_tls_session_reuse(sock, sock->tlsstream.tls);
|
||||
tlshandle = isc__nmhandle_get(sock, &sock->peer, &sock->iface);
|
||||
if (sock->tlsstream.server) {
|
||||
if (sock->listener->accept_cb == NULL) {
|
||||
if (isc__nmsocket_closing(sock->listener)) {
|
||||
result = ISC_R_CANCELED;
|
||||
} else {
|
||||
result = sock->listener->accept_cb(
|
||||
|
Reference in New Issue
Block a user