mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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).
This commit is contained in:
parent
c2e11a039d
commit
5a76e22406
1 changed files with 4 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue