+3157. [tuning] Reduce the time spent in "rndc reconfig" by parsing
+ the config file before pausing the server. [RT #21373]
+
3156. [bug] Reconfiguring the server with an incorrectly
formatted TSIG key could cause a crash during
subsequent zone transfers. [RT #20391]
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: server.c,v 1.520.12.28 2011/09/23 00:37:28 each Exp $ */
+/* $Id: server.c,v 1.520.12.29 2011/10/07 04:41:30 each Exp $ */
/*! \file */
isc_uint32_t udpsize;
unsigned int maxsocks;
int num_zones = 0;
+ isc_boolean_t exclusive = ISC_FALSE;
cfg_aclconfctx_init(&aclconfctx);
ISC_LIST_INIT(viewlist);
- /* Ensure exclusive access to configuration data. */
- result = isc_task_beginexclusive(server->task);
- RUNTIME_CHECK(result == ISC_R_SUCCESS);
-
/*
* Parse the global default pseudo-config file.
*/
maps[i++] = ns_g_defaults;
maps[i] = NULL;
+ /* Ensure exclusive access to configuration data. */
+ if (!exclusive) {
+ result = isc_task_beginexclusive(server->task);
+ RUNTIME_CHECK(result == ISC_R_SUCCESS);
+ exclusive = ISC_TRUE;
+ }
+
/*
* Set process limits, which (usually) needs to be done as root.
*/
adjust_interfaces(server, ns_g_mctx);
/* Relinquish exclusive access to configuration data. */
- isc_task_endexclusive(server->task);
+ if (exclusive)
+ isc_task_endexclusive(server->task);
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_SERVER,
ISC_LOG_DEBUG(1), "load_configuration: %s",