2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-03 08:05:21 +00:00

Fix a few places where the new config code would fail if there was no

config file (-c /dev/null).
This commit is contained in:
Brian Wellington
2001-03-06 19:04:42 +00:00
parent 72b7d215f7
commit 7c294304af

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: server.c,v 1.296 2001/03/06 02:49:29 bwelling Exp $ */ /* $Id: server.c,v 1.297 2001/03/06 19:04:42 bwelling Exp $ */
#include <config.h> #include <config.h>
@@ -1664,7 +1664,13 @@ load_configuration(const char *filename, ns_server_t *server,
ns_listenlist_t *listenon = NULL; ns_listenlist_t *listenon = NULL;
clistenon = NULL; clistenon = NULL;
(void)cfg_map_get(options, "listen-on", &clistenon); /*
* Even though listen-on is present in the default
* configuration, we can't use it here, since it isn't
* used if we're in lwresd mode. This way is easier.
*/
if (options != NULL)
(void)cfg_map_get(options, "listen-on", &clistenon);
if (clistenon != NULL) { if (clistenon != NULL) {
result = ns_listenlist_fromconfig(clistenon, result = ns_listenlist_fromconfig(clistenon,
config, config,
@@ -1691,7 +1697,8 @@ load_configuration(const char *filename, ns_server_t *server,
cfg_obj_t *clistenon = NULL; cfg_obj_t *clistenon = NULL;
ns_listenlist_t *listenon = NULL; ns_listenlist_t *listenon = NULL;
(void)cfg_map_get(options, "listen-on-v6", &clistenon); if (options != NULL)
(void)cfg_map_get(options, "listen-on-v6", &clistenon);
if (clistenon != NULL) { if (clistenon != NULL) {
result = ns_listenlist_fromconfig(clistenon, result = ns_listenlist_fromconfig(clistenon,
config, config,
@@ -1820,7 +1827,7 @@ load_configuration(const char *filename, ns_server_t *server,
/* /*
* Load the TKEY information from the configuration. * Load the TKEY information from the configuration.
*/ */
{ if (options != NULL) {
dns_tkeyctx_t *t = NULL; dns_tkeyctx_t *t = NULL;
CHECKM(ns_tkeyctx_fromconfig(options, ns_g_mctx, ns_g_entropy, CHECKM(ns_tkeyctx_fromconfig(options, ns_g_mctx, ns_g_entropy,
&t), &t),