diff options
author | brian <brian@FreeBSD.org> | 1998-11-05 21:59:48 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1998-11-05 21:59:48 +0000 |
commit | a254d82dc7a55c30838c21791570619fd74a5e56 (patch) | |
tree | 54f7a75b0fc4d742a2172f905f848715089e6c8c /usr.sbin | |
parent | b975f40fac11caca651c2bb4f4e08640381fcf8f (diff) | |
download | FreeBSD-src-a254d82dc7a55c30838c21791570619fd74a5e56.zip FreeBSD-src-a254d82dc7a55c30838c21791570619fd74a5e56.tar.gz |
Don't delete the primary interface address when
``iface clean'' is used in auto mode while there
are no active links.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ppp/command.c | 7 | ||||
-rw-r--r-- | usr.sbin/ppp/ppp.8 | 12 | ||||
-rw-r--r-- | usr.sbin/ppp/ppp.8.m4 | 12 |
3 files changed, 20 insertions, 11 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index 0ef359b..1894bc6 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.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); diff --git a/usr.sbin/ppp/ppp.8 b/usr.sbin/ppp/ppp.8 index 2571a0a..c343a8b 100644 --- a/usr.sbin/ppp/ppp.8 +++ b/usr.sbin/ppp/ppp.8 @@ -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 diff --git a/usr.sbin/ppp/ppp.8.m4 b/usr.sbin/ppp/ppp.8.m4 index 2571a0a..c343a8b 100644 --- a/usr.sbin/ppp/ppp.8.m4 +++ b/usr.sbin/ppp/ppp.8.m4 @@ -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 |