summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2005-07-12 01:47:22 +0000
committerBrad Smith <brad@cvs.openbsd.org>2005-07-12 01:47:22 +0000
commitaf14d3fea871682f01c9ce4a38b21eb97373cb30 (patch)
treec46d62417eb20d91d0b33f4b372ac91641731734 /usr.sbin
parenta411418963c7d664db529efe4064ef84cb7bb8e9 (diff)
rev 1.117
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. From brian FreeBSD
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/ppp/ipcp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ppp/ppp/ipcp.c b/usr.sbin/ppp/ppp/ipcp.c
index 41b53f4b4c2..f6c3db63f25 100644
--- a/usr.sbin/ppp/ppp/ipcp.c
+++ b/usr.sbin/ppp/ppp/ipcp.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: ipcp.c,v 1.39 2004/06/26 20:12:48 claudio Exp $
+ * $OpenBSD: ipcp.c,v 1.40 2005/07/12 01:47:21 brad Exp $
*/
#include <sys/param.h>
@@ -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.