diff options
author | brian <brian@FreeBSD.org> | 2002-09-23 22:40:43 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2002-09-23 22:40:43 +0000 |
commit | f3374bb45c06bf3a170a858c777fdde4c6f23d75 (patch) | |
tree | 678b4e232c222af8cf7b407035e9ac60d970e15b | |
parent | 3285b1032f0085dbe403e64311f32060657fffec (diff) | |
download | FreeBSD-src-f3374bb45c06bf3a170a858c777fdde4c6f23d75.zip FreeBSD-src-f3374bb45c06bf3a170a858c777fdde4c6f23d75.tar.gz |
If the peer gives us 0.0.0.0 as his IP number, NAK it rather than accepting
it as being in range.
set ifaddr 1.2.3.4/0 5.6.7.8/0
no longer allows 0.0.0.0 as a valid IP.
Reported/tested by: Bohdan Horst <nexus@hoth.amu.edu.pl>
MFC after: 3 days
-rw-r--r-- | usr.sbin/ppp/ipcp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/ppp/ipcp.c b/usr.sbin/ppp/ipcp.c index 4ebf4b3..1897d12 100644 --- a/usr.sbin/ppp/ipcp.c +++ b/usr.sbin/ppp/ipcp.c @@ -1013,7 +1013,8 @@ ipcp_ValidateReq(struct ipcp *ipcp, struct in_addr ip, struct fsm_decode *dec) } return; } - } else if (!ncprange_containsip4(&ipcp->cfg.peer_range, ip)) { + } else if (ip.s_addr == INADDR_ANY || + !ncprange_containsip4(&ipcp->cfg.peer_range, ip)) { /* * If the destination address is not acceptable, NAK with what we * want to use. |