summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/command.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-12-19 18:11:05 +0000
committerbrian <brian@FreeBSD.org>1997-12-19 18:11:05 +0000
commit8e957697c83621114a5d0afe449498991460beb3 (patch)
treec20b1a776ca03d9ae4450c59d532ce90b16e187e /usr.sbin/ppp/command.c
parent4c44bbc963fa915de93777e1b226870cbd1bac17 (diff)
downloadFreeBSD-src-8e957697c83621114a5d0afe449498991460beb3.zip
FreeBSD-src-8e957697c83621114a5d0afe449498991460beb3.tar.gz
Reset our "ifaddr" to zero if the "set ifaddr" fails in
-auto mode. This makes ppp correctly exit if you kick it off twice in auto mode with the same label (read: interface).
Diffstat (limited to 'usr.sbin/ppp/command.c')
-rw-r--r--usr.sbin/ppp/command.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c
index ecab28c..020d518 100644
--- a/usr.sbin/ppp/command.c
+++ b/usr.sbin/ppp/command.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: command.c,v 1.113 1997/12/18 00:28:35 brian Exp $
+ * $Id: command.c,v 1.114 1997/12/18 01:10:13 brian Exp $
*
*/
#include <sys/param.h>
@@ -1260,8 +1260,10 @@ SetInterfaceAddr(struct cmdargs const *arg)
IpcpInfo.his_ipaddr.s_addr = DefHisAddress.ipaddr.s_addr;
if ((mode & MODE_AUTO) &&
- OsSetIpaddress(DefMyAddress.ipaddr, DefHisAddress.ipaddr) < 0)
+ OsSetIpaddress(DefMyAddress.ipaddr, DefHisAddress.ipaddr) < 0) {
+ DefMyAddress.ipaddr.s_addr = DefHisAddress.ipaddr.s_addr = 0L;
return 4;
+ }
}
return 0;
OpenPOWER on IntegriCloud