summaryrefslogtreecommitdiff
path: root/sbin/ifconfig/ifconfig.c
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-04-14 02:38:22 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-04-14 02:38:22 +0000
commit2128599ecc8e4929f0ab92dcfb53455be5ff1e90 (patch)
treeee3c92d320ea578d79a9a316d21c160f96212c7e /sbin/ifconfig/ifconfig.c
parentbfda8d2882d169a87e51f539a4432a9effdfbe55 (diff)
recover "ifconfig -a" and "ifconfig -A" behavior for inet (least surprise).
Diffstat (limited to 'sbin/ifconfig/ifconfig.c')
-rw-r--r--sbin/ifconfig/ifconfig.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 04fdd4169b2..8626077e88c 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifconfig.c,v 1.32 2000/04/11 18:08:42 mickey Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.33 2000/04/14 02:38:21 itojun 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.32 2000/04/11 18:08:42 mickey Exp $";
+static char rcsid[] = "$OpenBSD: ifconfig.c,v 1.33 2000/04/14 02:38:21 itojun Exp $";
#endif
#endif /* not lint */
@@ -620,10 +620,9 @@ printif(ifrm, ifaliases)
sizeof(ifrp->ifr_name))) {
register const struct afswtch *p;
-#if 0
- if (ifaliases == 0 && noinet == 0)
+ if (ifrp->ifr_addr.sa_family == AF_INET &&
+ ifaliases == 0 && noinet == 0)
continue;
-#endif
ifr = *ifrp;
#ifdef INET6
/* quickhack: sizeof(ifr) < sizeof(ifr6) */
@@ -640,7 +639,8 @@ printif(ifrm, ifaliases)
}
}
count++;
- noinet = 0;
+ if (ifrp->ifr_addr.sa_family == AF_INET)
+ noinet = 0;
continue;
}
}