diff options
author | brian <brian@FreeBSD.org> | 2004-07-15 09:42:16 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2004-07-15 09:42:16 +0000 |
commit | 47bda6be1fa17935cd9a1ecc772291cf81dfc325 (patch) | |
tree | ed9d9dd22f26d1089823abf0d46ce66578211baa /usr.sbin/ppp | |
parent | 2bc5ca0db19721f1fcb277f48bac73b062dc811e (diff) | |
download | FreeBSD-src-47bda6be1fa17935cd9a1ecc772291cf81dfc325.zip FreeBSD-src-47bda6be1fa17935cd9a1ecc772291cf81dfc325.tar.gz |
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).
PR: 62050
Submitted by: Peter Jeremy <peter.jeremy@alcatel.com.au>
MFC after: 3 days
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r-- | usr.sbin/ppp/command.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index 635b197..a0bb4ca 100644 --- a/usr.sbin/ppp/command.c +++ b/usr.sbin/ppp/command.c @@ -1578,8 +1578,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); |