From aad270b0d364be6877db5d40ae77209813cd3040 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Tue, 12 Jul 2005 03:01:13 +0000 Subject: rev 1.298 Fix ``set ifaddr''. The code was actually using an uninitialised variable, but conveniently, because ncpaddr.ncpaddr_family != AF_INET, the call to ncpaddr_getip4addr() became a no-op leaving the local address as it was (defaulting to whatever my hostname resolves to). From brian FreeBSD --- usr.sbin/ppp/ppp/command.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ppp/ppp/command.c b/usr.sbin/ppp/ppp/command.c index a21b07c3f51..e5cee805b7c 100644 --- a/usr.sbin/ppp/ppp/command.c +++ b/usr.sbin/ppp/ppp/command.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: command.c,v 1.82 2005/07/12 01:28:10 brad Exp $ + * $OpenBSD: command.c,v 1.83 2005/07/12 03:01:12 brad Exp $ */ #include @@ -1555,8 +1555,8 @@ SetInterfaceAddr(struct cmdargs const *arg) } /* 0.0.0.0 means any address (0 bits) */ - ncpaddr_getip4(&ncpaddr, &ncp->ipcp.my_ip); ncprange_getaddr(&ncp->ipcp.cfg.my_range, &ncpaddr); + ncpaddr_getip4(&ncpaddr, &ncp->ipcp.my_ip); if (ncp->ipcp.my_ip.s_addr == INADDR_ANY) ncprange_setwidth(&ncp->ipcp.cfg.my_range, 0); bundle_AdjustFilters(arg->bundle, &ncpaddr, NULL); @@ -2046,12 +2046,14 @@ SetVariable(struct cmdargs const *arg) &arg->bundle->ncp.ipcp.cfg.fsm.maxtrm, DEF_FSMTRIES); break; +#ifndef NOINET6 case VAR_IPV6CPRETRY: res = SetRetry(arg->argc - arg->argn, arg->argv + arg->argn, &arg->bundle->ncp.ipv6cp.cfg.fsm.timeout, &arg->bundle->ncp.ipv6cp.cfg.fsm.maxreq, &arg->bundle->ncp.ipv6cp.cfg.fsm.maxtrm, DEF_FSMTRIES); break; +#endif case VAR_NBNS: case VAR_DNS: -- cgit v1.2.3