Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Aug 2002 07:05:04 -0700 (PDT)
From:      Mark Rekai <mark@inetu.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/42084: PicoBSD's 'netstat -i' reports negative Ipkts count.
Message-ID:  <200208271405.g7RE54eg070354@www.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         42084
>Category:       misc
>Synopsis:       PicoBSD's 'netstat -i' reports negative Ipkts count.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 27 07:10:05 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Mark Rekai
>Release:        PicoBSD 4.6.2
>Organization:
>Environment:
>Description:
'netstat -i' counters on PicoBSD's tinyware ns / netstat are displayed as signed with a %d in printf function.  High counter values are displayed as negative.

The incorrectly displayed data ultimately comes from an if_data struct (net/if.h).  Variables decalred in this structure that are incorrectly displayed by tinyware ns / netstat are all unsigned.

Easy to see the problem with looking at printfs in ns.c from tinyware ns and comparing the way the printed data is declared in the if.h header.

>How-To-Repeat:
Try it on a box with lots of lots of traffic.
>Fix:
printf with %lu instead.
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208271405.g7RE54eg070354>