From 736fc9be30e7e47258ef2be2bf161cc68dc55dbc Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Sat, 28 Sep 2002 10:16:25 +0000 Subject: MFC: 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. Approved by: re (jhb) --- usr.sbin/ppp/ipcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.sbin') diff --git a/usr.sbin/ppp/ipcp.c b/usr.sbin/ppp/ipcp.c index 4ebf4b3ac5f3..1897d12a9a02 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. -- cgit v1.3