Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sbin/ifconfig pullup 1.50->1.51 (thorpej): Don't force ...



details:   https://anonhg.NetBSD.org/src/rev/d53543ec7bf4
branches:  netbsd-1-4
changeset: 468710:d53543ec7bf4
user:      perry <perry%NetBSD.org@localhost>
date:      Fri Jun 18 16:44:15 1999 +0000

description:
pullup 1.50->1.51 (thorpej): Don't force "inet" on status display

diffstat:

 sbin/ifconfig/ifconfig.c |  13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diffs (42 lines):

diff -r 19628e3024d6 -r d53543ec7bf4 sbin/ifconfig/ifconfig.c
--- a/sbin/ifconfig/ifconfig.c  Fri Jun 18 16:35:36 1999 +0000
+++ b/sbin/ifconfig/ifconfig.c  Fri Jun 18 16:44:15 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.50.2.1 1999/06/18 16:44:15 perry 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.50.2.1 1999/06/18 16:44:15 perry 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