]> git.ipfire.org Git - thirdparty/bind9.git/commit
netmgr: have a single source of truth for tcpdns callback
authorWitold Kręcicki <wpk@isc.org>
Wed, 15 Jan 2020 13:53:42 +0000 (14:53 +0100)
committerWitold Kręcicki <wpk@isc.org>
Wed, 15 Jan 2020 16:22:13 +0000 (17:22 +0100)
commiteda4300bbbda8bc8b9800a788cff33e7781452bd
tree88d91743bfd7bae66055356f589f9203475b36d4
parent0d637b598572645331011140be35eae056d5951e
netmgr: have a single source of truth for tcpdns callback

We pass interface as an opaque argument to tcpdns listening socket.
If we stop listening on an interface but still have in-flight connections
the opaque 'interface' is not properly reference counted, and we might
hit a dead memory. We put just a single source of truth in a listening
socket and make the child sockets use that instead of copying the
value from listening socket. We clean the callback when we stop listening.
lib/isc/netmgr/netmgr-int.h
lib/isc/netmgr/tcpdns.c
lib/ns/client.c