]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Check if catz is active in dns_catz_update_from_db()
authorAram Sargsyan <aram@isc.org>
Thu, 2 Mar 2023 19:42:16 +0000 (19:42 +0000)
committerAram Sargsyan <aram@isc.org>
Thu, 2 Mar 2023 19:42:16 +0000 (19:42 +0000)
A reconfiguration can deactivate the catalog zone, while the
offloaded update process was preparing to run.

(cherry picked from commit 6980e3b354778e3ff628d8e72ddf357cb0d8b2a0)

lib/dns/catz.c

index 4bc96601661b57e78bc39dd0e4c63e1d2c532fca..2c00d6eba9b42b69e580a3d4c26f144a18175c59 100644 (file)
@@ -1862,6 +1862,14 @@ dns_catz_update_from_db(dns_db_t *db, dns_catz_zones_t *catzs) {
                return;
        }
 
+       if (!oldzone->active) {
+               /* This can happen during a reconfiguration. */
+               isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
+                             DNS_LOGMODULE_MASTER, ISC_LOG_INFO,
+                             "catz: zone '%s' is no longer active", bname);
+               return;
+       }
+
        isc_buffer_init(&ibname, bname, DNS_NAME_FORMATSIZE);
        result = dns_name_totext(&db->origin, true, &ibname);
        INSIST(result == ISC_R_SUCCESS);