diff options
author | brian <brian@FreeBSD.org> | 1997-12-19 04:49:53 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-12-19 04:49:53 +0000 |
commit | 47b91b0d8abca4e003acc0ff741437c1c44deb38 (patch) | |
tree | 5719913a224081659924d89ffe08f2cd8d261f9a /usr.sbin | |
parent | efed7b6cdc3b52ec7b15070962717a321fead604 (diff) | |
download | FreeBSD-src-47b91b0d8abca4e003acc0ff741437c1c44deb38.zip FreeBSD-src-47b91b0d8abca4e003acc0ff741437c1c44deb38.tar.gz |
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!).
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ppp/ipcp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ppp/ipcp.c b/usr.sbin/ppp/ipcp.c index 624ea88..eedef01 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)); |