1012. [bug] The -p option to named did not behave as documented.
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -98,6 +98,7 @@
|
||||
|
||||
1123. [bug] dig +[no]fail did not match description. [RT #2052]
|
||||
|
||||
1012. [bug] The -p option to named did not behave as documented.
|
||||
|
||||
--- 9.2.0 released ---
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: config.c,v 1.11.2.1 2001/09/21 20:30:32 gson Exp $ */
|
||||
/* $Id: config.c,v 1.11.2.2 2002/01/24 03:06:23 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -419,11 +419,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)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: server.c,v 1.339.2.2 2002/01/23 02:11:32 gson Exp $ */
|
||||
/* $Id: server.c,v 1.339.2.3 2002/01/24 03:06:25 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -1088,7 +1088,10 @@ configure_forward(cfg_obj_t *config, dns_view_t *view, dns_name_t *origin,
|
||||
/*
|
||||
* Determine which port to send forwarded requests to.
|
||||
*/
|
||||
CHECKM(ns_config_getport(config, &port), "port");
|
||||
if (ns_g_lwresdonly && ns_g_port != 0)
|
||||
port = ns_g_port;
|
||||
else
|
||||
CHECKM(ns_config_getport(config, &port), "port");
|
||||
|
||||
if (forwarders != NULL) {
|
||||
portobj = cfg_tuple_get(forwarders, "port");
|
||||
@@ -1727,7 +1730,10 @@ load_configuration(const char *filename, ns_server_t *server,
|
||||
/*
|
||||
* Determine which port to use for listening for incoming connections.
|
||||
*/
|
||||
CHECKM(ns_config_getport(config, &listen_port), "port");
|
||||
if (ns_g_port != 0)
|
||||
listen_port = ns_g_port;
|
||||
else
|
||||
CHECKM(ns_config_getport(config, &listen_port), "port");
|
||||
|
||||
/*
|
||||
* Configure the interface manager according to the "listen-on"
|
||||
@@ -2671,9 +2677,13 @@ ns_listenelt_fromconfig(cfg_obj_t *listener, cfg_obj_t *config,
|
||||
|
||||
portobj = cfg_tuple_get(listener, "port");
|
||||
if (!cfg_obj_isuint32(portobj)) {
|
||||
result = ns_config_getport(config, &port);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user