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.
This commit is contained in:
Ondřej Surý 2022-01-07 13:12:22 +01:00
parent efca93942c
commit c960236adb

View file

@ -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);