bind9/lib/isc/netmgr
Michał Kępień d6f9785ac6
Enable extraction of exact local socket addresses
Extracting the exact address that each wildcard/TCP socket is bound to
locally requires issuing the getsockname() system call, which libuv
exposes via its uv_*_getsockname() functions.  This is only required for
detailed logging and comes at a noticeable performance cost, so it
should not happen by default.  However, it is useful for debugging
certain problems (e.g. cryptic system test failures), so a convenient
way of enabling that behavior should exist.

Update isc_nmhandle_localaddr() so that it calls uv_*_getsockname() when
the ISC_SOCKET_DETAILS preprocessor macro is set at compile time.
Ensure proper handling of sockets that wrap other sockets.

Set the new ISC_SOCKET_DETAILS macro by default when --enable-developer
is passed to ./configure.  This enables detailed logging in the system
tests run in GitLab CI without affecting performance in non-development
BIND 9 builds.

Note that setting the ISC_SOCKET_DETAILS preprocessor macro at compile
time enables all callers of isc_nmhandle_localaddr() to extract the
exact address of a given local socket, which results e.g. in dnstap
captures containing more accurate information.

Mention the new preprocessor macro in the section of the ARM that
discusses why exact socket addresses may not be logged by default.
2024-12-29 12:32:05 +01:00
..
http.c TLS SNI - add low level support for SNI to the networking code 2024-12-26 17:23:12 +02:00
netmgr-int.h TLS SNI - add low level support for SNI to the networking code 2024-12-26 17:23:12 +02:00
netmgr.c Enable extraction of exact local socket addresses 2024-12-29 12:32:05 +01:00
proxystream.c TLS SNI - add low level support for SNI to the networking code 2024-12-26 17:23:12 +02:00
proxyudp.c Remove redundant semicolons after the closing braces of functions 2024-11-19 12:27:22 +01:00
socket.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
streamdns.c TLS SNI - add low level support for SNI to the networking code 2024-12-26 17:23:12 +02:00
tcp.c Fix nsupdate hang when processing a large update 2024-12-05 15:40:48 +01:00
timer.c Update netmgr, tasks, and applications to use isc_loopmgr 2022-08-26 09:09:24 +02:00
tlsstream.c TLS SNI - add low level support for SNI to the networking code 2024-12-26 17:23:12 +02:00
udp.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00