bind9/bin/named
Michał Kępień 2d75c96874
Prevent an infinite loop in shutdown_listener()
The loop in shutdown_listener() assumes that the reference count for
every controlconnection_t object on the listener->connections linked
list will drop down to zero after the conn_shutdown() call in the loop's
body.  However, when the timing is just right, some netmgr callbacks for
a given control connection may still be awaiting processing by the same
event loop that executes shutdown_listener() when the latter is run.
Since these netmgr callbacks must be run in order for the reference
count for the relevant controlconnection_t objects to drop to zero, when
the scenario described above happens, shutdown_listener() runs into an
infinite loop due to one of the controlconnection_t objects on the
listener->connections linked list never going away from the head of that
list.

Fix by safely iterating through the listener->connections list and
initiating shutdown for all controlconnection_t objects found.  This
allows any pending netmgr callbacks to be run by the same event loop in
due course, i.e. after shutdown_listener() returns.
2023-12-18 11:07:04 +01:00
..
include Remove the lock-file configuration and -X argument to named 2023-10-26 22:42:37 +02:00
.gitignore Complete rewrite the BIND 9 build system 2020-04-21 14:19:48 +02:00
bind9.xsl Expose the SOA query transport type used before/during XFR 2023-09-22 09:56:33 +00:00
builtin.c Give the rdataset->privateN fields more helpful names 2023-07-17 14:50:25 +02:00
config.c remove resolver-retry-interval and resolver-nonbackoff-tries 2023-12-06 11:54:59 -08:00
control.c Make sure we shutdown the controlconf listeners and connections once 2023-11-16 16:58:12 +01:00
controlconf.c Prevent an infinite loop in shutdown_listener() 2023-12-18 11:07:04 +01:00
dlz_dlopen_driver.c Remove do-nothing header <isc/print.h> 2023-02-15 16:44:47 +00:00
fuzz.c Update netmgr, tasks, and applications to use isc_loopmgr 2022-08-26 09:09:24 +02:00
geoip.c Remove do-nothing header <isc/print.h> 2023-02-15 16:44:47 +00:00
log.c Properly name ADB hashmap and named log memory contexts 2023-01-30 12:54:57 +01:00
logconf.c Remove do-nothing header <isc/print.h> 2023-02-15 16:44:47 +00:00
main.c Remove the lock-file configuration and -X argument to named 2023-10-26 22:42:37 +02:00
Makefile.am Add support for User Statically Defined Tracing (USDT) probes 2023-08-21 18:39:53 +02:00
named.conf.rst remove {root-}delegation-only 2023-03-23 12:57:01 -07:00
named.rst Remove the lock-file configuration and -X argument to named 2023-10-26 22:42:37 +02:00
os.c Remove the lock-file configuration and -X argument to named 2023-10-26 22:42:37 +02:00
server.c remove resolver-retry-interval and resolver-nonbackoff-tries 2023-12-06 11:54:59 -08:00
statschannel.c Fix error path issue in xfrin_xmlrender() 2023-09-27 10:03:40 +00:00
tkeyconf.c Remove TKEY Mode 2 (Diffie-Hellman) 2023-03-08 08:36:25 +01:00
transportconf.c Update sources to Clang 15 formatting 2022-11-29 08:54:34 +01:00
tsigconf.c convert TSIG keyring storage from RBT to hash table 2023-06-14 08:14:38 +00:00
xsl_p.h Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
zoneconf.c Ignore inline-signing by default 2023-10-17 10:52:36 +02:00