mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
Add more zone locks
Add more zone locks around code that touches zone timer setting in failure modes.
This commit is contained in:
parent
7212961849
commit
143d1c9767
@ -7167,12 +7167,12 @@ failure:
|
||||
} else if (db != NULL) {
|
||||
dns_db_detach(&db);
|
||||
}
|
||||
|
||||
LOCK_ZONE(zone);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
LOCK_ZONE(zone);
|
||||
set_resigntime(zone);
|
||||
zone_needdump(zone, DNS_DUMP_DELAY);
|
||||
DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_NEEDNOTIFY);
|
||||
UNLOCK_ZONE(zone);
|
||||
} else {
|
||||
/*
|
||||
* Something failed. Retry in 5 minutes.
|
||||
@ -7181,6 +7181,7 @@ failure:
|
||||
isc_interval_set(&ival, 300, 0);
|
||||
isc_time_nowplusinterval(&zone->resigntime, &ival);
|
||||
}
|
||||
UNLOCK_ZONE(zone);
|
||||
|
||||
INSIST(version == NULL);
|
||||
}
|
||||
@ -9679,6 +9680,7 @@ cleanup:
|
||||
dns_db_detach(&db);
|
||||
}
|
||||
|
||||
LOCK_ZONE(zone);
|
||||
if (ISC_LIST_HEAD(zone->signing) != NULL) {
|
||||
isc_interval_t interval;
|
||||
if (zone->update_disabled || result != ISC_R_SUCCESS) {
|
||||
@ -9690,6 +9692,7 @@ cleanup:
|
||||
} else {
|
||||
isc_time_settoepoch(&zone->signingtime);
|
||||
}
|
||||
UNLOCK_ZONE(zone);
|
||||
|
||||
INSIST(version == NULL);
|
||||
}
|
||||
@ -19692,6 +19695,7 @@ zone_rekey(dns_zone_t *zone) {
|
||||
result = ISC_R_SUCCESS;
|
||||
|
||||
failure:
|
||||
LOCK_ZONE(zone);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
/*
|
||||
* Something went wrong; try again in ten minutes or
|
||||
@ -19701,6 +19705,7 @@ failure:
|
||||
0);
|
||||
isc_time_nowplusinterval(&zone->refreshkeytime, &ival);
|
||||
}
|
||||
UNLOCK_ZONE(zone);
|
||||
|
||||
dns_diff_clear(&diff);
|
||||
dns_diff_clear(&_sig_diff);
|
||||
|
Loading…
x
Reference in New Issue
Block a user