From: Ondřej Surý Date: Fri, 7 Jan 2022 12:12:22 +0000 (+0100) Subject: Don't schedule next zone events when shutting down X-Git-Tag: v9.18.0~21^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c960236adbf709c1068649159984abe13f54ceac;p=thirdparty%2Fbind9.git Don't schedule next zone events when shutting down When the named is shutting down, the zone event callbacks could re-schedule the stub and refresh events leading to assertion failure. Handle the ISC_R_SHUTTINGDOWN event state gracefully by bailing out. --- diff --git a/lib/dns/zone.c b/lib/dns/zone.c index d4a66ec5b50..26e41db45e7 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -13607,6 +13607,8 @@ stub_callback(isc_task_t *task, isc_event_t *event) { switch (revent->result) { case ISC_R_SUCCESS: break; + case ISC_R_SHUTTINGDOWN: + goto exiting; case ISC_R_TIMEDOUT: if (!DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NOEDNS)) { DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_NOEDNS); @@ -13988,6 +13990,8 @@ refresh_callback(isc_task_t *task, isc_event_t *event) { switch (revent->result) { case ISC_R_SUCCESS: break; + case ISC_R_SHUTTINGDOWN: + goto exiting; case ISC_R_TIMEDOUT: if (!DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NOEDNS)) { DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_NOEDNS);