From oyvind@kebab.gaffel.nu  Tue Feb 12 05:11:05 2002
Return-Path: <oyvind@kebab.gaffel.nu>
Received: from kebab.gaffel.nu (kebab.gaffel.nu [217.8.138.140])
	by hub.freebsd.org (Postfix) with SMTP id 2254137B417
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 12 Feb 2002 05:11:04 -0800 (PST)
Received: (qmail 27191 invoked by uid 1000); 12 Feb 2002 13:07:06 -0000
Message-Id: <20020212130706.27190.qmail@kebab.gaffel.nu>
Date: 12 Feb 2002 13:07:06 -0000
From: "yvind" Kolbu <oyvind@kebab.gaffel.nu>
Reply-To: "yvind" Kolbu <oyvind@kebab.gaffel.nu>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Netstat output to small
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         34874
>Category:       bin
>Synopsis:       Netstat output to small
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bms
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 12 05:20:01 PST 2002
>Closed-Date:    Tue Dec 13 00:54:12 GMT 2005
>Last-Modified:  Tue Dec 13 00:54:12 GMT 2005
>Originator:     yvind Kolbu
>Release:        FreeBSD 4.5-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD kebab.gaffel.nu 4.5-PRERELEASE FreeBSD 4.5-PRERELEASE #4: Tue Dec 25 18:02:35 CET 2001 oyvind@kebab.gaffel.nu:/usr/obj/usr/src/sys/kebab i386


	netstat from 4.5-PRERELEASE
>Description:
	When having aliases with a total length of more than 13 characters, 
	the remaing 2 possible characters are removed. This only happens in
	the third column, in the fourth it is displayed correctly.
	Example output, with the alias set to 192.168.168.168:
	dc0 1500 192.168.168.1 192.168.168.168 ... etc
>How-To-Repeat:
	run `netstat -I device0 -n' with an IP with 3 digits in all the fields.
>Fix:

	Increase the max width between the third and the forth column 
	to 20. 17 for the IP, and three for additional CIDR notation.
>Release-Note:
>Audit-Trail:

From: =?iso-8859-1?Q?=D8yvind?= Kolbu <oyvind@kebab.gaffel.nu>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/34874 Netstat output to small
Date: Thu, 16 May 2002 10:42:14 +0200

 The width should be 18, not 20 as first described in the pr.
 Apply this patch to src/usr.bin/netstat/if.c 
 
 ---- Begin patch ----
 --- if.c.orig   Thu May 16 10:28:55 2002
 +++ if.c        Thu May 16 10:29:26 2002
 @@ -203,7 +203,7 @@
                 return;
 
         if (!pfunc) {
 -               printf("%-5.5s %-5.5s %-13.13s %-15.15s %8.8s %5.5s",
 +               printf("%-5.5s %-5.5s %-18.18s %-15.15s %8.8s %5.5s",
                        "Name", "Mtu", "Network", "Address", "Ipkts", "Ierrs");
                 if (bflag)
                         printf(" %10.10s","Ibytes");
 @@ -269,7 +269,7 @@
 
                 if (ifaddraddr == 0) {
                         printf("%-5.5s %-5lu ", name, ifnet.if_mtu);
 -                       printf("%-13.13s ", "none");
 +                       printf("%-18.18s ", "none");
                         printf("%-15.15s ", "none");
                 } else {
                         if (kread(ifaddraddr, (char *)&ifaddr, sizeof ifaddr)) {
 @@ -288,7 +288,7 @@
                         printf("%-5.5s %-5lu ", name, ifnet.if_mtu);
                         switch (sa->sa_family) {
                         case AF_UNSPEC:
 -                               printf("%-13.13s ", "none");
 +                               printf("%-18.18s ", "none");
                                 printf("%-15.15s ", "none");
                                 break;
                         case AF_INET:
 @@ -299,10 +299,10 @@
                                  */
                                 in = inet_makeaddr(ifaddr.in.ia_subnet,
                                         INADDR_ANY);
 -                               printf("%-13.13s ", netname(in.s_addr,
 +                               printf("%-18.18s ", netname(in.s_addr,
                                     ifaddr.in.ia_subnetmask));
  #else
 -                               printf("%-13.13s ",
 +                               printf("%-18.18s ",
                                     netname(htonl(ifaddr.in.ia_subnet),
                                     ifaddr.in.ia_subnetmask));
  #endif
 ---- End patch ----
 
 yvind Kolbu
State-Changed-From-To: open->patched 
State-Changed-By: bms 
State-Changed-When: Mon Jun 14 15:16:43 GMT 2004 
State-Changed-Why:  
Bug does not appear to be reproducible on -CURRENT, and the code 
is significantly different. 


Responsible-Changed-From-To: freebsd-bugs->bms 
Responsible-Changed-By: bms 
Responsible-Changed-When: Mon Jun 14 15:16:43 GMT 2004 
Responsible-Changed-Why:  
Bug does not appear to be reproducible on -CURRENT, and the code 
is significantly different. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=34874 
State-Changed-From-To: patched->closed 
State-Changed-By: bms 
State-Changed-When: Tue Dec 13 00:54:02 UTC 2005 
State-Changed-Why:  
-CURRENT is now -STABLE 

http://www.freebsd.org/cgi/query-pr.cgi?pr=34874 
>Unformatted:
