]> git.ipfire.org Git - thirdparty/bind9.git/commit
Clone the csock in accept_connection(), not in callback
authorOndřej Surý <ondrej@sury.org>
Fri, 18 Sep 2020 10:27:40 +0000 (12:27 +0200)
committerOndřej Surý <ondrej@isc.org>
Thu, 8 Oct 2020 05:24:31 +0000 (07:24 +0200)
commite8b56acb49f65b5143cd3f0d6f5e863df625a4c7
tree4a2ffcd65285ea787ab8b4e37e77ee28593c6929
parentd86a74d8a4c1c530baa714bbbad78fba9a4b29ab
Clone the csock in accept_connection(), not in callback

If we clone the csock (children socket) in TCP accept_connection()
instead of passing the ssock (server socket) to the call back and
cloning it there we unbreak the assumption that every socket is handled
inside it's own worker thread and therefore we can get rid of (at least)
callback locking.
lib/isc/netmgr/netmgr.c
lib/isc/netmgr/tcp.c
lib/isc/netmgr/tcpdns.c
lib/isc/netmgr/udp.c