From 5cd7e9d4db393c314dd1a761c52d2cb3a4da9b72 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Wed, 31 Oct 2001 19:35:19 +0000 Subject: [PATCH] 1083. [bug] The default control channel listened on the wildcard adress, not the loopback as documented. --- CHANGES | 3 +++ bin/named/controlconf.c | 11 ++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index e31eccf820..6470c21563 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +1083. [bug] The default control channel listened on the + wildcard adress, not the loopback as documented. + 1082. [bug] The -g option to named incorrectly caused logging to be sent to syslog in addition to stderr. [RT #1974] diff --git a/bin/named/controlconf.c b/bin/named/controlconf.c index feab0078a2..7dfa639cc9 100644 --- a/bin/named/controlconf.c +++ b/bin/named/controlconf.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: controlconf.c,v 1.34 2001/10/19 21:00:12 gson Exp $ */ +/* $Id: controlconf.c,v 1.35 2001/10/31 19:35:19 gson Exp $ */ #include @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -1161,13 +1162,17 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config, isc_sockaddr_t addr; if (i == 0) { + struct in_addr localhost; + if (isc_net_probeipv4() != ISC_R_SUCCESS) continue; - isc_sockaddr_any(&addr); + localhost.s_addr = htonl(INADDR_LOOPBACK); + isc_sockaddr_fromin(&addr, &localhost, 0); } else { if (isc_net_probeipv6() != ISC_R_SUCCESS) continue; - isc_sockaddr_any6(&addr); + isc_sockaddr_fromin6(&addr, + &in6addr_loopback, 0); } isc_sockaddr_setport(&addr, NS_CONTROL_PORT);