]> git.ipfire.org Git - thirdparty/bind9.git/commit
add netmgr functions to support outgoing DNS queries
authorEvan Hunt <each@isc.org>
Sat, 5 Sep 2020 18:07:40 +0000 (11:07 -0700)
committerOndřej Surý <ondrej@isc.org>
Fri, 30 Oct 2020 10:11:54 +0000 (11:11 +0100)
commit5dcdc00b93d82d4feb5edeb4cd2b73a77325c29a
treeaac5b9e57934fd409f62b8c2bb0730042c9b7e94
parent2111ea05cd2cb2313f8a3c2d665886305982c69a
add netmgr functions to support outgoing DNS queries

- isc_nm_tcpdnsconnect() sets up up an outgoing TCP DNS connection.
- isc_nm_tcpconnect(), _udpconnect() and _tcpdnsconnect() now take a
  timeout argument to ensure connections time out and are correctly
  cleaned up on failure.
- isc_nm_read() now supports UDP; it reads a single datagram and then
  stops until the next time it's called.
- isc_nm_cancelread() now runs asynchronously to prevent assertion
  failure if reading is interrupted by a non-network thread (e.g.
  a timeout).
- isc_nm_cancelread() can now apply to UDP sockets.
- added shim code to support UDP connection in versions of libuv
  prior to 1.27, when uv_udp_connect() was added

all these functions will be used to support outgoing queries in dig,
xfrin, dispatch, etc.
12 files changed:
bin/rndc/rndc.c
configure.ac
lib/isc/include/isc/netmgr.h
lib/isc/netmgr/netmgr-int.h
lib/isc/netmgr/netmgr.c
lib/isc/netmgr/tcp.c
lib/isc/netmgr/tcpdns.c
lib/isc/netmgr/udp.c
lib/isc/netmgr/uv-compat.c
lib/isc/netmgr/uv-compat.h
lib/isc/netmgr/uverr2result.c
lib/isc/win32/libisc.def.in