]> git.ipfire.org Git - thirdparty/bind9.git/commit
Refactor the interface handling in the netmgr
authorOndřej Surý <ondrej@sury.org>
Wed, 26 May 2021 06:15:34 +0000 (08:15 +0200)
committerOndřej Surý <ondrej@sury.org>
Wed, 26 May 2021 07:43:12 +0000 (09:43 +0200)
commit50270de8a012e1e90e9f56ae817fd85061cecebe
tree52e2c6bff2c8a072eddc6a83cd50e463ccc2e7b6
parentbef3a9b01f644e08940cd6325adfbb4f3c7c0625
Refactor the interface handling in the netmgr

The isc_nmiface_t type was holding just a single isc_sockaddr_t,
so we got rid of the datatype and use plain isc_sockaddr_t in place
where isc_nmiface_t was used before.  This means less type-casting and
shorter path to access isc_sockaddr_t members.

At the same time, instead of keeping the reference to the isc_sockaddr_t
that was passed to us when we start listening, we will keep a local
copy. This prevents the data race on destruction of the ns_interface_t
objects where pending nmsockets could reference the sockaddr of already
destroyed ns_interface_t object.
20 files changed:
bin/dig/dighost.c
bin/named/controlconf.c
bin/rndc/rndc.c
bin/tests/test_client.c
bin/tests/test_server.c
lib/dns/xfrin.c
lib/isc/httpd.c
lib/isc/include/isc/netmgr.h
lib/isc/include/isc/types.h
lib/isc/netmgr/http.c
lib/isc/netmgr/netmgr-int.h
lib/isc/netmgr/netmgr.c
lib/isc/netmgr/tcp.c
lib/isc/netmgr/tcpdns.c
lib/isc/netmgr/tlsdns.c
lib/isc/netmgr/tlsstream.c
lib/isc/netmgr/udp.c
lib/isc/tests/doh_test.c
lib/isc/tests/netmgr_test.c
lib/ns/interfacemgr.c