]> git.ipfire.org Git - thirdparty/bind9.git/commit
rndc: prevent crashing after receiving a signal
authorMichał Kępień <michal@isc.org>
Wed, 19 Jan 2022 13:30:17 +0000 (14:30 +0100)
committerMichał Kępień <michal@isc.org>
Wed, 19 Jan 2022 13:30:17 +0000 (14:30 +0100)
commitd1d721aae1ba9bef8752b2d55bdc95b603096447
treebabfaabba7350ade00fdd3d5fc2d48f9c75b25ea
parent289c1d33ee553cb75dc03318d46d45d33ccd9d24
rndc: prevent crashing after receiving a signal

If isc_app_run() gets interrupted by a signal, the global 'rndc_task'
variable may already be detached from (set to NULL) by the time the
outstanding netmgr callbacks are run.  This triggers an assertion
failure in isc_task_shutdown().  However, explicitly calling
isc_task_shutdown() from rndc code is redundant because it does not use
isc_task_onshutdown() and the task_shutdown() function gets
automatically called anyway when the task manager gets destroyed (after
isc_app_run() returns).  Remove the redundant isc_task_shutdown() calls
to prevent crashes after receiving a signal.
bin/rndc/rndc.c