]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Don't schedule next zone events when shutting down
authorOndřej Surý <ondrej@isc.org>
Fri, 7 Jan 2022 12:12:22 +0000 (13:12 +0100)
committerOndřej Surý <ondrej@isc.org>
Thu, 13 Jan 2022 16:58:33 +0000 (17:58 +0100)
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.

lib/dns/zone.c

index d4a66ec5b5004d3f9ce6d7b50011dbf0e836fea6..26e41db45e7cbb134c2d242ffa072913704a5c77 100644 (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);