summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-02-24 21:24:48 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-02-24 21:24:48 +0000
commit03432e9be38c2fb37df63c25437fb179344e028b (patch)
tree6ca7b429555dc86e0d56a01bc943ce95763cce92 /sbin
parentf0a3d88e840ce5cebeac20fa59d2c185dead7c79 (diff)
for things like "ifconfig xx0 up", do not automatically set an address.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ifconfig/ifconfig.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index de8c5af4511..98557e860e5 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifconfig.c,v 1.20 1998/09/03 23:08:09 jason Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.21 1999/02/24 21:24:47 deraadt Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
@@ -81,7 +81,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94";
#else
-static char rcsid[] = "$OpenBSD: ifconfig.c,v 1.20 1998/09/03 23:08:09 jason Exp $";
+static char rcsid[] = "$OpenBSD: ifconfig.c,v 1.21 1999/02/24 21:24:47 deraadt Exp $";
#endif
#endif /* not lint */
@@ -131,7 +131,7 @@ int ipx_type = ETHERTYPE_II;
char name[30];
int flags, metric, mtu, setaddr, setipdst, doalias;
int clearaddr, s;
-int newaddr = 1;
+int newaddr = 0;
int nsellength = 1;
int af = AF_INET;
int dflag, mflag, lflag, uflag;
@@ -557,6 +557,7 @@ setifaddr(addr, param)
* and the flags may change when the address is set.
*/
setaddr++;
+ newaddr = 1;
if (doalias == 0)
clearaddr = 1;
(*afp->af_getaddr)(addr, (doalias >= 0 ? ADDR : RIDADDR));