Bug 154455 - 64bit network counters peg instead of wrapping
Summary: 64bit network counters peg instead of wrapping
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: net-snmp
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Radek Vokál
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 156320 156322
TreeView+ depends on / blocked
 
Reported: 2005-04-11 21:28 UTC by Guy Streeter
Modified: 2016-02-10 01:32 UTC (History)
2 users (show)

Fixed In Version: RHSA-2005-395
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-10-05 12:38:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch to make the network counters wrap (2.36 KB, patch)
2005-04-11 21:29 UTC, Guy Streeter
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2005:373 0 qe-ready SHIPPED_LIVE Low: net-snmp security update 2005-09-28 04:00:00 UTC
Red Hat Product Errata RHSA-2005:395 0 qe-ready SHIPPED_LIVE Low: net-snmp security update 2005-10-05 04:00:00 UTC

Description Guy Streeter 2005-04-11 21:28:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050323 Firefox/1.0.2 Fedora/1.0.2-1.3.1

Description of problem:
On systems running a 64bit kernel, the values in /proc/net/dev can get too large to fit in a 32bit object. Since they are counters they should wrap, but instead they stick the the maximum value.
This is because sscanf returns the maximum value when the scanned value doesn't fit in the size specified by the format conversion.

A solution is to use unsigned long longs for scanning, and cast them to unsigned longs afterward. This process will cause them values to wrap as expected.


Version-Release number of selected component (if applicable):
net-snmp-5.1.2-11

How reproducible:
Always

Steps to Reproduce:
1. Look at ifOutOctets on a 64bit system that has been up long enough for the value to wrap.
2.
3.
  

Actual Results:  The value sticks at 4294967295

Expected Results:  The value should wrap

Additional info:

I will attach a patch I have tested.

Comment 1 Guy Streeter 2005-04-11 21:29:59 UTC
Created attachment 112996 [details]
patch to make the network counters wrap

Comment 2 Radek Vokál 2005-04-20 08:09:49 UTC
Thanks, checked into next net-snmp update

Comment 5 dff 2005-06-22 13:54:04 UTC
PM ACK for U2; 3 ACKS so move to CanFix.

Comment 6 Red Hat Bugzilla 2005-09-28 14:26:20 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2005-373.html


Comment 7 Red Hat Bugzilla 2005-10-05 12:38:49 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2005-395.html



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