From owner-freebsd-bugs Tue Mar 12 20:30: 8 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 88DE937B417 for ; Tue, 12 Mar 2002 20:30:00 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2D4U0R82694; Tue, 12 Mar 2002 20:30:00 -0800 (PST) (envelope-from gnats) Received: from mail.westbend.net (ns1.westbend.net [216.47.253.3]) by hub.freebsd.org (Postfix) with ESMTP id 3ED0B37B400 for ; Tue, 12 Mar 2002 20:26:21 -0800 (PST) Received: (from root@localhost) by mail.westbend.net (8.11.6/8.11.6) id g2D4QKB29342; Tue, 12 Mar 2002 22:26:20 -0600 (CST) (envelope-from admin) Message-Id: <200203130426.g2D4QKB29342@mail.westbend.net> Date: Tue, 12 Mar 2002 22:26:20 -0600 (CST) From: "Scot W. Hetzel" Reply-To: "Scot W. Hetzel" To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/35838: Change to size of WID_IF in usr.bin/netstat/route.c Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 35838 >Category: bin >Synopsis: Change to size of WID_IF in usr.bin/netstat/route.c >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Mar 12 20:30:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: Scot W. Hetzel >Release: FreeBSD 4.5-STABLE i386 >Organization: West Bend Internet >Environment: System: FreeBSD mail.westbend.net 4.5-STABLE FreeBSD 4.5-STABLE #1: Thu Mar 7 11:41:02 CST 2002 root@wbiW009.westbend.net:/usr/obj/usr/src/sys/GENERIC i386 >Description: With an ET/5025PQ Quad T1 card installed in a 4.5-STABLE server (configured for frame relay), the output of netstat -r shows that the interface name is truncated: ns0# netstat -rn | head -n 8 Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 10.0.0.1 UGSc 24533 210882 fxp0 10.0.1.220/30 10.0.1.222 Uc 0 0 etha73 127 lo0 UScB 0 0 lo0 127.0.0.1 127.0.0.1 UH 2 14 lo0 etha73 is suppossed to be etha736. Currently, the -W flag to netstat doesn't increase this column's width. >How-To-Repeat: >Fix: With the below patch, the output of netstat -rnW is: ns0# netstat -rnW | head -n 8 Routing tables Internet: Destination Gateway Flags Refs Use Mtu Netif Expire default 10.0.0.1 UGSc 24535 210884 1500 fxp0 10.0.1.220/30 10.0.1.222 Uc 0 0 1500 etha736 127 lo0 UScB 0 0 16384 lo0 127.0.0.1 127.0.0.1 UH 2 14 16384 lo0 Could this change be made to CURRENT, and MFC'd to STABLE? Index: route.c =================================================================== RCS file: /home/ncvs/src/usr.bin/netstat/route.c,v retrieving revision 1.41.2.11 diff -u -r1.41.2.11 route.c --- route.c 18 Oct 2001 10:33:25 -0000 1.41.2.11 +++ route.c 13 Mar 2002 03:38:03 -0000 @@ -225,13 +225,13 @@ #ifndef INET6 #define WID_DST(af) 18 /* width of destination column */ #define WID_GW(af) 18 /* width of gateway column */ -#define WID_IF(af) 6 /* width of netif column */ +#define WID_IF(af) (Wflag ? 8 : 6) /* width of netif column */ #else #define WID_DST(af) \ ((af) == AF_INET6 ? (Wflag ? 39 : (numeric_addr ? 33: 18)) : 18) #define WID_GW(af) \ ((af) == AF_INET6 ? (Wflag ? 31 : (numeric_addr ? 29 : 18)) : 18) -#define WID_IF(af) ((af) == AF_INET6 ? 8 : 6) +#define WID_IF(af) ((af) == AF_INET6 ? 8 : (Wflag ? 8 : 6)) #endif /*INET6*/ /* >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message