Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/ifconfig Don't force `inet' on status display; get all ...
details: https://anonhg.NetBSD.org/src/rev/e49fa84c9e59
branches: trunk
changeset: 473025:e49fa84c9e59
user: thorpej <thorpej%NetBSD.org@localhost>
date: Mon May 17 16:00:05 1999 +0000
description:
Don't force `inet' on status display; get all address families that have
configured addresses. From Jun-ichiro itojun Hagino, PR #7593.
diffstat:
sbin/ifconfig/ifconfig.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diffs (42 lines):
diff -r 7a9c8fb2d6ad -r e49fa84c9e59 sbin/ifconfig/ifconfig.c
--- a/sbin/ifconfig/ifconfig.c Mon May 17 15:14:53 1999 +0000
+++ b/sbin/ifconfig/ifconfig.c Mon May 17 16:00:05 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ifconfig.c,v 1.50 1999/04/01 08:12:23 chopps Exp $ */
+/* $NetBSD: ifconfig.c,v 1.51 1999/05/17 16:00:05 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -80,7 +80,7 @@
#if 0
static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94";
#else
-__RCSID("$NetBSD: ifconfig.c,v 1.50 1999/04/01 08:12:23 chopps Exp $");
+__RCSID("$NetBSD: ifconfig.c,v 1.51 1999/05/17 16:00:05 thorpej Exp $");
#endif
#endif /* not lint */
@@ -367,9 +367,9 @@
}
}
+ /* Initialize af, just for use in getinfo(). */
if (afp == NULL)
- afp = afs;
- af = ifr.ifr_addr.sa_family = afp->af_af;
+ af = afs->af_af;
/* Get information about the interface. */
(void) strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
@@ -382,6 +382,11 @@
exit(0);
}
+ /* The following operations assume inet family as the default. */
+ if (afp == NULL)
+ afp = afs;
+ af = ifr.ifr_addr.sa_family = afp->af_af;
+
/* Process commands. */
while (argc > 0) {
struct cmd *p;
Home |
Main Index |
Thread Index |
Old Index