From owner-freebsd-bugs@FreeBSD.ORG Fri May 16 16:50:14 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0BD3637B401 for ; Fri, 16 May 2003 16:50:14 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E50C843FAF for ; Fri, 16 May 2003 16:50:12 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h4GNoCUp072370 for ; Fri, 16 May 2003 16:50:12 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h4GNoCrd072369; Fri, 16 May 2003 16:50:12 -0700 (PDT) Resent-Date: Fri, 16 May 2003 16:50:12 -0700 (PDT) Resent-Message-Id: <200305162350.h4GNoCrd072369@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Mike Tancsa Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A562537B401 for ; Fri, 16 May 2003 16:42:24 -0700 (PDT) Received: from smtp1.sentex.ca (smtp1.sentex.ca [199.212.134.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id C00C243FAF for ; Fri, 16 May 2003 16:42:18 -0700 (PDT) (envelope-from mdtancsa@sentex.net) Received: from shell1.sentex.ca (shell1.sentex.ca [199.212.134.3]) by smtp1.sentex.ca (8.12.9/8.12.9) with ESMTP id h4GNgB4M047317 for ; Fri, 16 May 2003 19:42:11 -0400 (EDT) (envelope-from mdtancsa@sentex.net) Received: from shell1.sentex.ca (localhost [127.0.0.1]) by shell1.sentex.ca (8.12.9/8.12.8) with ESMTP id h4GNlFnR055653 for ; Fri, 16 May 2003 19:47:15 -0400 (EDT) (envelope-from mdtancsa@shell1.sentex.ca) Received: (from mdtancsa@localhost) by shell1.sentex.ca (8.12.9/8.12.8/Submit) id h4GNlF9H055652; Fri, 16 May 2003 19:47:15 -0400 (EDT) (envelope-from mdtancsa) Message-Id: <200305162347.h4GNlF9H055652@shell1.sentex.ca> Date: Fri, 16 May 2003 19:47:15 -0400 (EDT) From: Mike Tancsa To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/52349: netstat -ni broken for vlan interfaces X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Mike Tancsa List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2003 23:50:14 -0000 >Number: 52349 >Category: bin >Synopsis: netstat -ni broken for vlan interfaces >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri May 16 16:50:12 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Mike Tancsa >Release: FreeBSD 4.8-RC i386 >Organization: >Environment: System: FreeBSD shell1.sentex.ca 4.8-RC FreeBSD 4.8-RC #0: Tue Mar 4 05:53:50 EST 2003 mdtancsa@shell1.sentex.ca:/usr/obj/usr/src/sys/shell1 i386 >Description: I noticed that with netstat if you have more than 9 vlan interfaces, you will never see netstat -ni displayed properly as the interface name column is truncated to 6 chars. e.g. vlan10 will get displayed as vlan1 >How-To-Repeat: define more than 10 vlan devices (e.g 11) so that vlan10 gets created. Look at netstat -ni >Fix: Not sure if this is the most correct, but it works --- if.c Mon Sep 17 10:35:46 2001 +++ if.c.patched Fri May 16 19:25:00 2003 @@ -268,7 +268,7 @@ drops = ifnet.if_snd.ifq_drops; if (ifaddraddr == 0) { - printf("%-5.5s %-5lu ", name, ifnet.if_mtu); + printf("%-7.7s %-5lu ", name, ifnet.if_mtu); printf("%-13.13s ", "none"); printf("%-15.15s ", "none"); } else { @@ -285,7 +285,7 @@ (u_long)TAILQ_NEXT(&ifaddr.ifa, ifa_link); continue; } - printf("%-5.5s %-5lu ", name, ifnet.if_mtu); + printf("%-7.7s %-5lu ", name, ifnet.if_mtu); switch (sa->sa_family) { case AF_UNSPEC: printf("%-13.13s ", "none"); >Release-Note: >Audit-Trail: >Unformatted: