Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 12852 - ifconfig reports wrong packet statistics when they're greater than LONG_MAX
ifconfig reports wrong packet statistics when they're greater than LONG_MAX
Product: Red Hat Linux
Classification: Retired
Component: net-tools (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Crutcher Dunnavant
Depends On:
  Show dependency treegraph
Reported: 2000-06-23 08:38 EDT by Tomasz Beger
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-02-15 15:24:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tomasz Beger 2000-06-23 08:38:22 EDT
When an interface statistic counter is greater than 2147483647 ifconfig 
always reports the value of 2147483647 (LONG_MAX on i386). The reason of 
this behavior is that the internal representation device statistic counter 
in Linux device structure is an unsigned long and the ifconfig utility 
reads the interface statistic counters from /proc/net/dev file system as a 
string and then converts the textual representation into a long. The 
conversion is done in function if_getstats()(ifconfig.c) by a call to 
sscanf() function but with wrong conversion specification. The sscanf() 
function is told to treat the string as a signed long (%ld) and it returns 
the 2147483647 value for all strings that represent numbers exceeding the 
range of long.
Comment 1 Pekka Savola 2001-02-15 15:24:40 EST
This has been fixed in upstream net-tools-1.58.
Comment 2 Crutcher Dunnavant 2001-04-19 14:39:01 EDT

Note You need to log in before you can comment on or make changes to this bug.