Subject: kern/5435: "netstat -i -b"'s interface counters too small
To: None <gnats-bugs@gnats.netbsd.org>
From: Wolfgang Rupprecht <wolfgang@wsrcc.com>
List: netbsd-bugs
Date: 05/10/1998 06:41:10
>Number:         5435
>Category:       kern
>Synopsis:       "netstat -i -b"'s interface counters too small
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 10 06:50:00 1998
>Last-Modified:
>Originator:     Wolfgang Rupprecht
>Organization:
W S Rupprecht Computer Consulting, Fremont CA
>Release:        netbsd-current: supped May 3, 1998
>Environment:
	
System: NetBSD capsicum.wsrcc.com 1.3E NetBSD 1.3E (WSRCC) #0: Sun May 3 15:53:21 PDT 1998 root@capsicum.wsrcc.com:/v/src/netbsd/NetBSD-current/usr/src/sys/arch/i386/compile/WSRCC i386


>Description:
	netstat -i -b interface counters overflows and displays negative 
	numbers.

>How-To-Repeat:
	run inn, download a few files, then do a netstat -i -b a few
	days later.  (Notice Ibytes/Obytes, for first two lines.)

    $ netstat -i -b
    Name  Mtu   Network       Address               Ibytes     Obytes
    de0   1500  <Link>        00:00:c0:e2:7d:e4 -572616099 1033734989
    de0   1500  24.1.64/20    something         -572616099 1033734989
    de1   1500  <Link>        00:00:c0:15:b1:e3   44424997  168049880
    de1   1500  140.174.88/25 capsicum            44424997  168049880
    lo0   32976 <Link>                           150296724  150296724
    lo0   32976 loopback-net  localhost          150296724  150296724
    ppp0* 1500  <Link>                                   0          0
    ppp1* 1500  <Link>                                   0          0
    sl0*  296   <Link>                                   0          0
    sl1*  296   <Link>                                   0          0
    tun0* 1500  <Link>                                   0          0
    tun1* 1500  <Link>                                   0          0

>Fix:
	use a 64-bit type for byte counters.  Should this be off_t ??? 

>Audit-Trail:
>Unformatted: