Bug 42084 - [picobsd] PicoBSD's 'netstat -i' reports negative Ipkts count.
Summary: [picobsd] PicoBSD's 'netstat -i' reports negative Ipkts count.
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-27 15:10 UTC by Mark Rekai
Modified: 2019-11-05 02:43 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Rekai 2002-08-27 15:10:05 UTC
'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.

Fix: 

printf with %lu instead.
How-To-Repeat: Try it on a box with lots of lots of traffic.
Comment 1 Luigi Rizzo freebsd_committer 2002-09-22 20:35:37 UTC
Responsible Changed
From-To: freebsd-bugs->luigi

i will handle this
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:31 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 3 Kyle Evans freebsd_committer 2019-11-05 02:43:10 UTC
This PR has not seen resolution in 17 years, and PicoBSD has now been removed in r354346. Closing this as "Overcome by Events".