Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/netstat Do the same IEEE1394 address hack in here.



details:   https://anonhg.NetBSD.org/src/rev/ba0cd3dbe460
branches:  trunk
changeset: 499243:ba0cd3dbe460
user:      matt <matt%NetBSD.org@localhost>
date:      Tue Nov 14 23:07:40 2000 +0000

description:
Do the same IEEE1394 address hack in here.

diffstat:

 usr.bin/netstat/route.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (38 lines):

diff -r a6c10ed745b6 -r ba0cd3dbe460 usr.bin/netstat/route.c
--- a/usr.bin/netstat/route.c   Tue Nov 14 23:03:35 2000 +0000
+++ b/usr.bin/netstat/route.c   Tue Nov 14 23:07:40 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: route.c,v 1.50 2000/10/11 14:46:15 is Exp $    */
+/*     $NetBSD: route.c,v 1.51 2000/11/14 23:07:40 matt Exp $  */
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "from: @(#)route.c      8.3 (Berkeley) 3/9/94";
 #else
-__RCSID("$NetBSD: route.c,v 1.50 2000/10/11 14:46:15 is Exp $");
+__RCSID("$NetBSD: route.c,v 1.51 2000/11/14 23:07:40 matt Exp $");
 #endif
 #endif /* not lint */
 
@@ -497,13 +497,17 @@
                else switch (sdl->sdl_type) {
                case IFT_FDDI:
                case IFT_ETHER:
+               case IFT_IEEE1394:
                    {
-                       int i;
+                       int i, alen = sdl->sdl_alen;
                        u_char *lla = (u_char *)sdl->sdl_data +
                            sdl->sdl_nlen;
 
+                       if (sdl->sdl_type == IFT_IEEE1394 && alen > 8)
+                               alen = 8;
+
                        cplim = "";
-                       for (i = 0; i < sdl->sdl_alen; i++, lla++) {
+                       for (i = 0; i < alen; i++, lla++) {
                                /* XXX */
                                cp += sprintf(cp, "%s%02x", cplim, *lla);
                                cplim = ":";



Home | Main Index | Thread Index | Old Index