bind9/bin/named
Ondřej Surý febeac215d Keep idle reused outgoing TCP connections under read
A reused TCP/TLS dispatch with no outstanding responses was left in the
reuse pool with no read pending, so a peer closing the idle connection
went unnoticed: the socket lingered in CLOSE-WAIT and the dead dispatch
was later handed to a new query, which failed and the fetch timed out.
Keep a read pending on an idle connected dispatch, bounded by an idle
timeout, so the close is seen promptly and the connection is dropped
from the pool instead of reused.

The idle read may only be (re)armed while the dispatch is still
connected; arming it on a dispatch that is already shutting down
re-reads a dying handle and double-schedules a netmgr job.

On shutdown, close the connection as soon as the dispatch reaches its
terminal state instead of waiting for the last reference to drop, so an
unexpected read (or a peer-side close) cannot leave the socket in
CLOSE-WAIT while a reference still lingers.
2026-06-24 13:52:46 +02:00
..
include Fix DoH quota global variables type 2026-06-11 11:32:26 +00:00
.gitignore Complete rewrite the BIND 9 build system 2020-04-21 14:19:48 +02:00
bind9.xsl Disable output escaping in bind9.xsl 2026-05-14 10:00:21 +10:00
builtin.c dns_rdataset_* const parameters 2026-01-30 19:33:42 +01:00
config.c Fix port validation rejecting valid port 65535 2026-03-14 10:11:55 +01:00
control.c Remove the rndc testgen command 2026-04-30 06:35:01 +02:00
controlconf.c Run conn_cleanup on isccc_cc_towire failure in control_respond 2026-04-30 06:47:39 +02:00
dlz_dlopen_driver.c Use clang-format-20 to update formatting 2025-06-25 12:44:22 +10:00
fuzz.c Change the loopmgr to be singleton 2025-07-23 22:44:16 +02:00
geoip.c Remove redundant parentheses from the return statement 2024-11-19 12:27:22 +01:00
log.c switch to CHECK where it wasn't being used 2025-12-03 13:45:42 -08:00
logconf.c standardize CHECK and RETERR macros 2025-12-03 13:26:28 -08:00
main.c Keep idle reused outgoing TCP connections under read 2026-06-24 13:52:46 +02:00
meson.build Split NZD functions into a separate compilation unit 2026-03-18 11:02:33 +01:00
named.conf.rst Remove the configblock sphinx extension 2025-06-23 13:45:09 +03:00
named.rst Finalize removal of memory debug flags size and mctx 2024-12-06 02:29:20 +00:00
nzd.c Stop nzd_env_close from chowning through symlinks 2026-04-29 19:18:47 +02:00
os.c implement the systemd notification protocol manually, drop libsystemd 2025-03-27 22:52:41 +03:00
server.c Disallow configuration of user-defined non-IN class views 2026-06-08 17:50:15 +02:00
statschannel.c Avoid writing through a const pointer in render_xsl() 2026-06-24 10:56:34 +02:00
tkeyconf.c standardize CHECK and RETERR macros 2025-12-03 13:26:28 -08:00
transportconf.c use a standard CLEANUP macro 2025-12-03 13:45:43 -08:00
tsigconf.c use a standard CLEANUP macro 2025-12-03 13:45:43 -08:00
xsl_c.in replace the build system with meson 2025-06-11 10:30:12 +03:00
xsl_p.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
zoneconf.c When configuring zone ACL, check template too 2026-05-29 06:04:30 +00:00