mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Check if catz is active in dns__catz_timer_cb()
A reconfiguration can deactivate the catalog zone, while the update process was deferred using a timer.
This commit is contained in:
@@ -2096,6 +2096,7 @@ dns__catz_timer_cb(void *arg) {
|
||||
LOCK(&catz->catzs->lock);
|
||||
|
||||
INSIST(DNS_DB_VALID(catz->db));
|
||||
INSIST(catz->dbversion != NULL);
|
||||
INSIST(catz->updb == NULL);
|
||||
INSIST(catz->updbversion == NULL);
|
||||
|
||||
@@ -2103,12 +2104,22 @@ dns__catz_timer_cb(void *arg) {
|
||||
catz->updaterunning = true;
|
||||
catz->updateresult = ISC_R_UNSET;
|
||||
|
||||
dns_name_format(&catz->name, domain, DNS_NAME_FORMATSIZE);
|
||||
|
||||
if (!catz->active) {
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
|
||||
DNS_LOGMODULE_MASTER, ISC_LOG_INFO,
|
||||
"catz: %s: no longer active, reload is canceled",
|
||||
domain);
|
||||
catz->updaterunning = false;
|
||||
catz->updateresult = ISC_R_CANCELED;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
dns_db_attach(catz->db, &catz->updb);
|
||||
INSIST(catz->dbversion != NULL);
|
||||
catz->updbversion = catz->dbversion;
|
||||
catz->dbversion = NULL;
|
||||
|
||||
dns_name_format(&catz->name, domain, DNS_NAME_FORMATSIZE);
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_MASTER,
|
||||
ISC_LOG_INFO, "catz: %s: reload start", domain);
|
||||
|
||||
@@ -2116,6 +2127,7 @@ dns__catz_timer_cb(void *arg) {
|
||||
isc_work_enqueue(catz->loop, dns__catz_update_cb, dns__catz_done_cb,
|
||||
catz);
|
||||
|
||||
exit:
|
||||
isc_timer_destroy(&catz->updatetimer);
|
||||
catz->loop = NULL;
|
||||
|
||||
|
Reference in New Issue
Block a user