| |
@@ -595,10 +595,12 @@
|
| |
dns_result_totext(result));
|
| |
|
| |
/* Handle collisions with automatic empty zones. */
|
| |
- if (isconfigured == true)
|
| |
+ if (isconfigured == true) {
|
| |
+ run_exclusive_enter(inst, &lock_state);
|
| |
CHECK(empty_zone_handle_conflicts(name,
|
| |
view->zonetable,
|
| |
(fwdpolicy == dns_fwdpolicy_first)));
|
| |
+ }
|
| |
|
| |
cleanup:
|
| |
run_exclusive_exit(inst, lock_state);
|
| |
Does not accept new request when exclusive mode is active. Zone table
can be modified even after main fwd entries have been added. Ensure
empty zones handling keeps exclusive mode active.
Exclusive mode were mentioned as the only protection it had by bind
maintainer:
https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/6637#note_308928
Another attempt to fix cause of possible crash in bug #2101712.
Catalog zones code, which implement very similar dynamic management of zones, but backed by another zone in BIND, use exclusive mode for all changes of zone table.