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