summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrian <brian@cvs.openbsd.org>1998-11-05 22:00:12 +0000
committerbrian <brian@cvs.openbsd.org>1998-11-05 22:00:12 +0000
commite7ae2bee5a3771c4e6d55b3a432a944bff04c8fc (patch)
treef2eb32c1e325c68f0416b9d57431a4617d5edfef /usr.sbin
parenta44837ec8701ac625b876dd7c4d9fe79d3aac160 (diff)
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/ppp/command.c7
-rw-r--r--usr.sbin/ppp/ppp/ppp.812
2 files changed, 12 insertions, 7 deletions
diff --git a/usr.sbin/ppp/ppp/command.c b/usr.sbin/ppp/ppp/command.c
index 18a2ce3d04c..2efd07101b8 100644
--- a/usr.sbin/ppp/ppp/command.c
+++ b/usr.sbin/ppp/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.4 1998/10/31 17:38:50 brian Exp $
+ * $Id: command.c,v 1.5 1998/11/05 22:00:11 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/31 17:38:50 $";
+const char VersionDate[] = "$Date: 1998/11/05 22:00:11 $";
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/ppp.8 b/usr.sbin/ppp/ppp/ppp.8
index e10b8c3b41d..968747626ce 100644
--- a/usr.sbin/ppp/ppp/ppp.8
+++ b/usr.sbin/ppp/ppp/ppp.8
@@ -1,4 +1,4 @@
-.\" $Id: ppp.8,v 1.5 1998/10/31 17:38:50 brian Exp $
+.\" $Id: ppp.8,v 1.6 1998/11/05 22:00:11 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