]> git.ipfire.org Git - thirdparty/bind9.git/commit
Attach the accept "client" socket to .listener member of the socket
authorOndřej Surý <ondrej@isc.org>
Fri, 24 Mar 2023 14:32:02 +0000 (15:32 +0100)
committerOndřej Surý <ondrej@isc.org>
Thu, 30 Mar 2023 14:10:08 +0000 (16:10 +0200)
commit2846888c573fcc610cdf71bcdd5bb6f92ffaf499
treebeb9fc2f2b24651f05c8a420d5fedc8baf3df304
parent45365adb324f8c602dfd28e53d4c6db4a7432a37
Attach the accept "client" socket to .listener member of the socket

When accepting a TCP connection in the higher layers (tlsstream,
streamdns, and http) attach to the socket the connection was accepted
on, and use this socket instead of the parent listening socket.

This has an advantage - accessing the sock->listener now doesn't break
the thread boundaries, so we can properly check whether the socket is
being closed without requiring .closing member to be atomic_bool.
lib/isc/netmgr/http.c
lib/isc/netmgr/netmgr-int.h
lib/isc/netmgr/netmgr.c
lib/isc/netmgr/streamdns.c
lib/isc/netmgr/tcp.c
lib/isc/netmgr/tlsstream.c
lib/isc/netmgr/udp.c