mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Use catzs->lock in dns_catz_prereconfig()
There can be an update running in another thread, so use a lock,
like it's done in dns_catz_postreconfig().
(cherry picked from commit 3973724d67)
This commit is contained in:
parent
b230fbb591
commit
fb15a6d6f6
1 changed files with 2 additions and 0 deletions
|
|
@ -2579,6 +2579,7 @@ dns_catz_prereconfig(dns_catz_zones_t *catzs) {
|
|||
|
||||
REQUIRE(DNS_CATZ_ZONES_VALID(catzs));
|
||||
|
||||
LOCK(&catzs->lock);
|
||||
isc_ht_iter_create(catzs->zones, &iter);
|
||||
for (result = isc_ht_iter_first(iter); result == ISC_R_SUCCESS;
|
||||
result = isc_ht_iter_next(iter))
|
||||
|
|
@ -2587,6 +2588,7 @@ dns_catz_prereconfig(dns_catz_zones_t *catzs) {
|
|||
isc_ht_iter_current(iter, (void **)&catz);
|
||||
catz->active = false;
|
||||
}
|
||||
UNLOCK(&catzs->lock);
|
||||
INSIST(result == ISC_R_NOMORE);
|
||||
isc_ht_iter_destroy(&iter);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue