From 5a76e22406868f51ca9604945b8264cc02a7af8f Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Fri, 19 Dec 1997 18:11:05 +0000 Subject: [PATCH] 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). --- usr.sbin/ppp/command.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index ecab28cdb79..020d51864e0 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 @@ -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;