Bug 606874 - snmptranslate reports Unsigned32 as -1
snmptranslate reports Unsigned32 as -1
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: net-snmp (Show other bugs)
6.0
All Linux
medium Severity medium
: rc
: ---
Assigned To: Jan Safranek
Karel Srot
: Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-22 12:21 EDT by Olivier Fourdan
Modified: 2013-03-03 21:49 EST (History)
5 users (show)

See Also:
Fixed In Version: net-snmp-5.5-24.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-10 16:12:29 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Proposed patch (1.74 KB, patch)
2010-06-22 12:21 EDT, Olivier Fourdan
no flags Details | Diff

  None (edit)
Description Olivier Fourdan 2010-06-22 12:21:30 EDT
Created attachment 426000 [details]
Proposed patch

Description of problem:

snmptranslate reports SYNTAX's value range as "(0..-1)"

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

net-snmp-5.5-22.el6

How reproducible:

Always

Steps to Reproduce:

1. snmptranslate -Td NET-SNMP-AGENT-MIB::nsTransactionID
  
Actual results:

NET-SNMP-AGENT-MIB::nsTransactionID
nsTransactionID OBJECT-TYPE
  -- FROM	NET-SNMP-AGENT-MIB
  SYNTAX	Unsigned32 (0..-1) 
  MAX-ACCESS	not-accessible
  STATUS	current
  DESCRIPTION	"The internal identifier for a given transaction."
::= { iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) netSnmp(8072) netSnmpObjects(1) nsTransactions(8) nsTransactionTable(1) nsTransactionEntry(1) 1 }


Expected results:

snmptranslate -Td NET-SNMP-AGENT-MIB::nsTransactionID
NET-SNMP-AGENT-MIB::nsTransactionID
nsTransactionID OBJECT-TYPE
  -- FROM	NET-SNMP-AGENT-MIB
  SYNTAX	Unsigned32 (0..4294967295) 
  MAX-ACCESS	not-accessible
  STATUS	current
  DESCRIPTION	"The internal identifier for a given transaction."
::= { iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) netSnmp(8072) netSnmpObjects(1) nsTransactions(8) nsTransactionTable(1) nsTransactionEntry(1) 1 }

Attaching patch proposed by our partner who reported the issue.

Additional info:
Comment 2 RHEL Product and Program Management 2010-06-23 03:42:54 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 3 Jan Safranek 2010-06-23 03:55:33 EDT
The patch won't work, net-snmp stores ranges as signed int, i.e. up to 2147483647. The MIB describes range of nsTransactionID as 0..4294967295, which simply won't fit there. Just retyping it to unsigned will break e.g. MTA-MIB::mtaGroupHierarchy, which is INTEGER (-2147483648..2147483647).

As proper solution, long should be used instead of int.
Comment 4 Jan Safranek 2010-06-23 04:04:56 EDT
(In reply to comment #3)
> As proper solution, long should be used instead of int.    

Which probably breaks ABI. I'd rather ask upstream...
Comment 5 Jan Safranek 2010-06-25 05:44:58 EDT
I've checked final solution to upstream SVN, rev. 19095.
Comment 8 Karel Srot 2010-07-07 05:12:46 EDT
Switching back to Assigned. Bug is not resolved properly on i386 platform.

On i386 platform I am getting "Unsigned32 (0..2147483647)" instead of "Unsigned32 (0..4294967295)".

NET-SNMP-AGENT-MIB::nsTransactionID
nsTransactionID OBJECT-TYPE
  -- FROM	NET-SNMP-AGENT-MIB
  SYNTAX	Unsigned32 (0..2147483647) 
  MAX-ACCESS	not-accessible
  STATUS	current
  DESCRIPTION	"The internal identifier for a given transaction."
Comment 13 releng-rhel@redhat.com 2010-11-10 16:12:29 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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