Don't delete the primary interface address when

``iface clean'' is used in auto mode while there
are no active links.
This commit is contained in:
brian 1998-11-05 21:59:48 +00:00
parent 4b3ca37c67
commit 8b481ceb01
3 changed files with 20 additions and 11 deletions

View File

@ -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.174 1998/10/27 22:53:22 brian Exp $
* $Id: command.c,v 1.175 1998/10/31 17:38:46 brian Exp $
*
*/
#include <sys/types.h>
@ -134,7 +134,7 @@
#define NEG_DNS 50
const char Version[] = "2.0";
const char VersionDate[] = "$Date: 1998/10/27 22:53:22 $";
const char VersionDate[] = "$Date: 1998/10/31 17:38:46 $";
static int ShowCommand(struct cmdargs const *);
static int TerminalCommand(struct cmdargs const *);
@ -2417,7 +2417,8 @@ IfaceClearCommand(struct cmdargs const *arg)
if (arg->argc != arg->argn)
return -1;
how = arg->bundle->ncp.ipcp.fsm.state == ST_OPENED ?
how = arg->bundle->ncp.ipcp.fsm.state == ST_OPENED ||
arg->bundle->phys_type.all & PHYS_AUTO ?
IFACE_CLEAR_ALIASES : IFACE_CLEAR_ALL;
iface_Clear(arg->bundle->iface, how);

View File

@ -1,4 +1,4 @@
.\" $Id: ppp.8,v 1.132 1998/10/27 22:53:22 brian Exp $
.\" $Id: ppp.8,v 1.133 1998/10/31 17:38:47 brian Exp $
.Dd 20 September 1995
.Os FreeBSD
.Dt PPP 8
@ -2528,10 +2528,14 @@ allows.
.It iface clear
If this command is used while
.Nm
is in the OPENED state, all addresses except for the IPCP negotiated
address are deleted from the interface. If
is in the OPENED state or while in
.Fl auto
mode, all addresses except for the IPCP negotiated address are deleted
from the interface. If
.Nm
is not in the OPENED state, all interface addresses are deleted.
is not in the OPENED state and is not in
.Fl auto
mode, all interface addresses are deleted.
.Pp
.It iface delete[!]|rm[!] Ar addr
This command deletes the given

View File

@ -1,4 +1,4 @@
.\" $Id: ppp.8,v 1.132 1998/10/27 22:53:22 brian Exp $
.\" $Id: ppp.8,v 1.133 1998/10/31 17:38:47 brian Exp $
.Dd 20 September 1995
.Os FreeBSD
.Dt PPP 8
@ -2528,10 +2528,14 @@ allows.
.It iface clear
If this command is used while
.Nm
is in the OPENED state, all addresses except for the IPCP negotiated
address are deleted from the interface. If
is in the OPENED state or while in
.Fl auto
mode, all addresses except for the IPCP negotiated address are deleted
from the interface. If
.Nm
is not in the OPENED state, all interface addresses are deleted.
is not in the OPENED state and is not in
.Fl auto
mode, all interface addresses are deleted.
.Pp
.It iface delete[!]|rm[!] Ar addr
This command deletes the given