diff options
author | brian <brian@cvs.openbsd.org> | 1997-12-19 04:50:39 +0000 |
---|---|---|
committer | brian <brian@cvs.openbsd.org> | 1997-12-19 04:50:39 +0000 |
commit | 38f7afd720ec7ee0b70bfa06c57c84d00676a0be (patch) | |
tree | 190ddd67c5a9e0301afa82421714f2179df725c5 /usr.sbin/ppp/ipcp.c | |
parent | 1aa10b4182e3b0f442de1b1bdf7b2507c1ab08dc (diff) |
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/ppp/ipcp.c')
-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 60eeda60f82..e436efc436b 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.5 1997/12/15 22:44:52 brian Exp $ + * $Id: ipcp.c,v 1.6 1997/12/19 04:50:38 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)); |