Bug 452026 - Warns on values > 2^31
Warns on values > 2^31
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: net-snmp (Show other bugs)
8
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Jan Safranek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-18 14:23 EDT by Henrik Nordstrom
Modified: 2008-06-18 14:32 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-06-18 14:32:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Henrik Nordstrom 2008-06-18 14:23:55 EDT
Description of problem:

snmpget of a counter32 variable having a value of 0xFFFF0000 results in a
warning "truncating unsigned value to 32 bits (2)".

Version-Release number of selected component (if applicable):

net-snmp-utils-5.4.1-7.fc8

How reproducible:

Each time querying for a SNMP variable with a value > 2^31.

Steps to Reproduce:

No simple test case created yet.

1. Set up an SNMP agent having a Counter32 variable with a value > 2^31.
2. snmpget of that variable
3.
  
Actual results:

snmpget prints the above warning, and outputs the correct result.

Expected results:

No warning unless the integer was ASN encoded using more than 4 bytes.

Additional info:

The value was ASN encoded using 3 bytes (24 bits). The error is most likely from
sign extension, which is done on all ASN.1 encoded integers.
Comment 1 Henrik Nordstrom 2008-06-18 14:32:03 EDT
On a second thought it may be an agent error.. it's better if the value is
encoded  using 5 bytes

  0x00FFFF0000

to prevent sign extension, and gets rid of the warning.

So it's not a bug. Gone.

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