]> git.ipfire.org Git - thirdparty/bind9.git/commit
allow tcpdns sockets to self-reference while connected
authorWitold Kręcicki <wpk@isc.org>
Wed, 10 Jun 2020 00:07:16 +0000 (17:07 -0700)
committerWitold Kręcicki <wpk@isc.org>
Fri, 19 Jun 2020 07:39:50 +0000 (09:39 +0200)
commitcd79b4953800daf87b6bfcea0b6f3ce3bec29988
tree3ee2ae173fb1c31d7c8c112071425959589742ce
parent5ea26ee1f11e2e3d294e9e92bc4810f7c525727a
allow tcpdns sockets to self-reference while connected

A TCPDNS socket creates a handle for each complete DNS message.

Previously, when all the handles were disconnected, the socket
would be closed, but the wrapped TCP socket might still have
more to read.

Now, when a connection is established, the TCPDNS socket creates
a reference to itself by attaching itself to sock->self. This
reference isn't cleared until the connection is closed via
EOF, timeout, or server shutdown. This allows the socket to remain
open even when there are no active handles for it.
lib/isc/netmgr/netmgr-int.h
lib/isc/netmgr/netmgr.c
lib/isc/netmgr/tcp.c
lib/isc/netmgr/tcpdns.c