]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3171. [bug] Exclusively lock the task when adding a zone using
authorMark Andrews <marka@isc.org>
Fri, 14 Oct 2011 05:38:50 +0000 (05:38 +0000)
committerMark Andrews <marka@isc.org>
Fri, 14 Oct 2011 05:38:50 +0000 (05:38 +0000)
                        'rndc addzone'.  [RT #25600]

CHANGES
bin/named/server.c

diff --git a/CHANGES b/CHANGES
index 311d65d1cf332afd210590f568d26b1deef80f94..e318ef6d6f7971ac50bc8f3bfedd266fcddb9a10 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+3171.  [bug]           Exclusively lock the task when adding a zone using
+                       'rndc addzone'.  [RT #25600]
+
        --- 9.9.0a3 released ---
 
 3170.  [func]          RPZ update:
index bf050e9f5ff26eef0cdbe2265a43d1feca987b65..c46d4ee3151d3507c0d1f477407b71862f663167 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: server.c,v 1.621 2011/10/11 00:09:01 each Exp $ */
+/* $Id: server.c,v 1.622 2011/10/14 05:38:49 marka Exp $ */
 
 /*! \file */
 
@@ -7579,13 +7579,14 @@ ns_server_add_zone(ns_server_t *server, char *args) {
        CHECK(isc_stdio_open(view->new_zone_file, "a", &fp));
 
        /* Mark view unfrozen so that zone can be added */
+       isc_task_beginexclusive(server->task);
        dns_view_thaw(view);
        result = configure_zone(cfg->config, parms, vconfig,
                                server->mctx, view, cfg->actx, ISC_FALSE);
        dns_view_freeze(view);
-       if (result != ISC_R_SUCCESS) {
+       isc_task_endexclusive(server->task);
+       if (result != ISC_R_SUCCESS)
                goto cleanup;
-       }
 
        /* Is it there yet? */
        CHECK(dns_zt_find(view->zonetable, &dnsname, 0, NULL, &zone));