Don't force `inet' on status display; get all address families that have

configured addresses.  From Jun-ichiro itojun Hagino, PR #7593.
This commit is contained in:
thorpej 1999-05-17 16:00:05 +00:00
parent 25cf35a4f3
commit 52971adece

View File

@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
#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 @@ main(argc, argv)
}
}
/* 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 @@ main(argc, argv)
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;