bind9/lib/ns
Michal Nowak ddfe8a1bdc Preserve the request buffer across async SIG(0) processing
For SIG(0)-signed requests, view matching is offloaded and the request
is finished asynchronously from ns_client_request_continue(), which
passes client->inner.buffer to dns_dt_send().  That buffer aliases the
network manager's receive buffer, only valid during the read callback,
so it may already be freed and reused, producing garbage dnstap frames
(e.g. the "upforwd" sig0-over-DoT test fails with UQ=0).

When the request is offloaded (ns_client_setup_view() returns
DNS_R_WAIT) and dnstap is enabled, copy the request buffer and point
client->inner.buffer at the copy so it survives the asynchronous hop;
free it in ns__client_reset_cb().  When dnstap is disabled there is no
async consumer of the buffer, so detach it from the receive buffer
instead.

Assisted-by: Claude:claude-opus-4-8
2026-06-08 11:30:28 +00:00
..
include Preserve the request buffer across async SIG(0) processing 2026-06-08 11:30:28 +00:00
.gitignore Add support for User Statically Defined Tracing (USDT) probes 2023-08-21 18:39:53 +02:00
client.c Preserve the request buffer across async SIG(0) processing 2026-06-08 11:30:28 +00:00
hooks.c use a standard CLEANUP macro 2025-12-03 13:45:43 -08:00
interfacemgr.c switch to RETERR where it wasn't being used 2025-12-03 13:45:43 -08:00
listenlist.c Use ControlStatementsExceptControlMacros for SpaceBeforeParens 2025-08-19 07:58:33 +02:00
meson.build Use unique names for probes.d files 2025-09-24 13:18:13 +02:00
notify.c Move zone set/get properties to own source file 2026-04-02 15:50:07 +02:00
probes-ns.d Use unique names for probes.d files 2025-09-24 13:18:13 +02:00
query.c Skip DNS64 synthesis when answering a redirected response 2026-05-28 11:11:17 +02:00
server.c Add low contention stats counter 2026-03-26 10:19:25 +01:00
stats.c Add low contention stats counter 2026-03-26 10:19:25 +01:00
tests Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
update.c Stop treating SIG and NXT records specially 2026-05-28 13:21:00 +02:00
xfrout.c Apply XFR-out quota after ACL is checked 2026-05-07 13:32:15 +02:00