bind9/lib/isc
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
..
include TLS SNI - add low level support for SNI to the networking code 2024-12-26 17:23:12 +02:00
netmgr Enable extraction of exact local socket addresses 2024-12-29 12:32:05 +01:00
.gitignore Add support for User Statically Defined Tracing (USDT) probes 2023-08-21 18:39:53 +02:00
ascii.c Consolidate some ASCII tables in isc/ascii and isc/hex 2022-09-12 12:18:57 +01:00
assertions.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
async.c Cleanup the __tsan_acquire/__tsan_release 2023-07-28 08:59:08 +02:00
async_p.h Change the isc_async API to use cds_wfcqueue internally 2023-05-12 14:16:25 +02:00
backtrace.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
base32.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
base64.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
commandline.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
condition.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
counter.c Implement global limit for outgoing queries 2024-12-05 14:17:07 +01:00
crypto.c Add new logging category for logging crypto errors in libisc 2024-11-26 11:22:33 +01:00
dir.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
entropy.c Switch the CSPRNG function from RAND_bytes() to uv_random() 2022-09-26 15:13:11 +02:00
errno.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
errno2result.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
errno2result.h Remove C++ support from the public header 2024-12-18 13:10:39 +01:00
error.c Remove do-nothing header <isc/print.h> 2023-02-15 16:44:47 +00:00
file.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
fips.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
getaddresses.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
hash.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
hashmap.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
heap.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
helper.c Add isc_helper API that adds 1:1 thread for each loop 2024-09-12 12:09:45 +00:00
hex.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
histo.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
hmac.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
ht.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
httpd.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
interfaceiter.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
iterated_hash.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
jemalloc_shim.h Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
job.c Add tracing probes to the isc_job unit 2023-08-21 18:39:53 +02:00
job_p.h Use proper padding instead of using alignas() 2024-02-08 10:54:35 +01:00
lex.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
lib.c unify libcrypto and evp_md handling 2024-10-16 14:03:14 +03:00
log.c clean up log module names 2024-12-11 17:11:32 +00:00
loop.c mark loop as shuttingdown earlier in shutdown_cb 2024-12-10 19:18:49 +00:00
loop_p.h Remove C++ support from the public header 2024-12-18 13:10:39 +01:00
Makefile.am Remove C++ support from the public header 2024-12-18 13:10:39 +01:00
managers.c remove isc_task completely 2023-02-16 18:35:32 +01:00
md.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
mem.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
mem_p.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
meminfo.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
mutex.c Fix PTHREAD_MUTEX_ADAPTIVE_NP and PTHREAD_MUTEX_ERRORCHECK_NP usage 2024-08-05 07:31:39 +00:00
mutex_p.h Use library constructor to create default mutex attr once 2022-07-13 13:19:32 +02:00
mutexblock.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
net.c Remove unused definition of ISC_CMSG_IP_TOS 2024-11-27 15:03:27 +01:00
netaddr.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
netscope.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
nonce.c Switch the CSPRNG function from RAND_bytes() to uv_random() 2022-09-26 15:13:11 +02:00
openssl_shim.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
openssl_shim.h Remove unused <openssl/hmac.h> headers from OpenSSL shims 2024-10-16 04:19:16 +00:00
os.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
os_p.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
parseint.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
picohttpparser.c Update picohttpparser.{c,h} with upstream repository 2024-12-08 11:14:37 +00:00
picohttpparser.h Update picohttpparser.{c,h} with upstream repository 2024-12-08 11:14:37 +00:00
portset.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
probes.d Add tracing probes to the isc_job unit 2023-08-21 18:39:53 +02:00
proxy2.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
quota.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
radix.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
random.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
ratelimiter.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
regex.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
region.c Incrementally apply AXFR transfer 2024-11-22 15:00:55 +01:00
result.c Replace remaining usage of DNS_R_MUSTBESECURE with DNS_R_NOVALIDSIG 2024-12-09 13:10:21 +01:00
rwlock.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
safe.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
serial.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
signal.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
sockaddr.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
stats.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
stdio.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
stdtime.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
string.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
symtab.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
syslog.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
tests Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
thread.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
tid.c Remove C++ support from the public header 2024-12-18 13:10:39 +01:00
time.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
timer.c use a thread-local variable to get the current running loop 2024-04-02 10:35:56 +02:00
tls.c Add new logging category for logging crypto errors in libisc 2024-11-26 11:22:33 +01:00
tm.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
url.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
utf8.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
uv.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
work.c Improve the Userspace RCU integration 2023-04-27 12:38:53 +02:00
xml.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00