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

1012. [bug] The -p option to named did not behave as documented.

This commit is contained in:
Andreas Gustafsson
2001-09-20 21:51:22 +00:00
parent 3bf31a5161
commit d9e690eb71
3 changed files with 15 additions and 11 deletions

View File

@@ -1,4 +1,6 @@
1012. [bug] The -p option to named did not behave as documented.
1011. [cleanup] Removed isc_dir_current().
1010. [bug] The server could attempt to execute a command channel

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: config.c,v 1.15 2001/09/17 00:33:52 marka Exp $ */
/* $Id: config.c,v 1.16 2001/09/20 21:51:21 gson Exp $ */
#include <config.h>
@@ -422,11 +422,6 @@ ns_config_getport(cfg_obj_t *config, in_port_t *portp) {
isc_result_t result;
int i;
if (ns_g_port != 0) {
*portp = ns_g_port;
return (ISC_R_SUCCESS);
}
cfg_map_get(config, "options", &options);
i = 0;
if (options != NULL)

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: server.c,v 1.344 2001/09/20 15:16:24 marka Exp $ */
/* $Id: server.c,v 1.345 2001/09/20 21:51:22 gson Exp $ */
#include <config.h>
@@ -1734,6 +1734,9 @@ load_configuration(const char *filename, ns_server_t *server,
/*
* Determine which port to use for listening for incoming connections.
*/
if (ns_g_port != 0)
listen_port = ns_g_port;
else
CHECKM(ns_config_getport(config, &listen_port), "port");
/*
@@ -2708,9 +2711,13 @@ ns_listenelt_fromconfig(cfg_obj_t *listener, cfg_obj_t *config,
portobj = cfg_tuple_get(listener, "port");
if (!cfg_obj_isuint32(portobj)) {
if (ns_g_port != 0) {
port = ns_g_port;
} else {
result = ns_config_getport(config, &port);
if (result != ISC_R_SUCCESS)
return (result);
}
} else {
if (cfg_obj_asuint32(portobj) >= ISC_UINT16_MAX) {
cfg_obj_log(portobj, ns_g_lctx, ISC_LOG_ERROR,