]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[9.18] fix: dev: Attach/detach to the listening child socket when accepting TLS
authorOndřej Surý <ondrej@isc.org>
Wed, 7 Aug 2024 16:00:55 +0000 (16:00 +0000)
committerOndřej Surý <ondrej@isc.org>
Wed, 7 Aug 2024 16:00:55 +0000 (16:00 +0000)
When TLS connection (TLSstream) connection was accepted, the children
listening socket was not attached to sock->server and thus it could have
been freed before all the accepted connections were actually closed.

In turn, this would cause us to call isc_tls_free() too soon - causing
cascade errors in pending SSL_read_ex() in the accepted connections.

Properly attach and detach the children listening socket when accepting
and closing the server connections.

Closes #4833

Backport of MR !9270

Merge branch 'backport-4833-tlssock-needs-to-attach-to-child-tlslistener-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9278


Trivial merge