dc250f
From 7b4c1e28b3e64f7cd075599472e349510f8d33da Mon Sep 17 00:00:00 2001
dc250f
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
dc250f
Date: Wed, 14 Sep 2022 17:10:11 +0200
dc250f
Subject: [PATCH] Modify empty zone conflicts under exclusive mode
dc250f
dc250f
Does not accept new request when exclusive mode is active. Zone table
dc250f
can be modified even after main fwd entries have been added. Ensure
dc250f
empty zones handling keeps exclusive mode active.
dc250f
dc250f
Exclusive mode were mentioned as the only protection it had by bind
dc250f
maintainer:
dc250f
https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/6637#note_308928
dc250f
---
dc250f
 src/fwd.c | 4 +++-
dc250f
 1 file changed, 3 insertions(+), 1 deletion(-)
dc250f
dc250f
diff --git a/src/fwd.c b/src/fwd.c
dc250f
index 24f6e53..0a3c673 100644
dc250f
--- a/src/fwd.c
dc250f
+++ b/src/fwd.c
dc250f
@@ -595,10 +595,12 @@ fwd_configure_zone(const settings_set_t *set, ldap_instance_t *inst,
dc250f
 		  dns_result_totext(result));
dc250f
 
dc250f
 	/* Handle collisions with automatic empty zones. */
dc250f
-	if (isconfigured == true)
dc250f
+	if (isconfigured == true) {
dc250f
+		run_exclusive_enter(inst, &lock_state);
dc250f
 		CHECK(empty_zone_handle_conflicts(name,
dc250f
 						  view->zonetable,
dc250f
 						  (fwdpolicy == dns_fwdpolicy_first)));
dc250f
+	}
dc250f
 
dc250f
 cleanup:
dc250f
 	run_exclusive_exit(inst, lock_state);
dc250f
-- 
dc250f
2.37.3
dc250f