From f5fb6bd02a1f9d107eabab24b5496a54651a4462 Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Fri, 19 Dec 1997 04:49:53 +0000 Subject: [PATCH] If the peer asks for IP 0.0.0.0, choose an IP ourselves without looking for it in our IP list (and if found, trying to ifconfig it!). --- usr.sbin/ppp/ipcp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ppp/ipcp.c b/usr.sbin/ppp/ipcp.c index 624ea88e652a..eedef010bb9e 100644 --- a/usr.sbin/ppp/ipcp.c +++ b/usr.sbin/ppp/ipcp.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: ipcp.c,v 1.41 1997/12/06 22:43:58 brian Exp $ + * $Id: ipcp.c,v 1.42 1997/12/13 02:37:24 brian Exp $ * * TODO: * o More RFC1772 backwoard compatibility @@ -382,7 +382,8 @@ IpcpDecodeConfig(u_char * cp, int plen, int mode_type) switch (mode_type) { case MODE_REQ: if (iplist_isvalid(&DefHisChoice)) { - if (iplist_ip2pos(&DefHisChoice, ipaddr) < 0 || + if (ipaddr.s_addr == INADDR_ANY || + iplist_ip2pos(&DefHisChoice, ipaddr) < 0 || OsTrySetIpaddress(DefMyAddress.ipaddr, ipaddr) != 0) { LogPrintf(LogIPCP, "%s: Address invalid or already in use\n", inet_ntoa(ipaddr));