Bug 606874

Summary: snmptranslate reports Unsigned32 as -1
Product: Red Hat Enterprise Linux 6 Reporter: Olivier Fourdan <ofourdan>
Component: net-snmpAssignee: Jan Safranek <jsafrane>
Status: CLOSED CURRENTRELEASE QA Contact: Karel Srot <ksrot>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: kem, ksrot, mvadkert, ovasik, tao
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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 21:12:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Proposed patch none

Description Olivier Fourdan 2010-06-22 16:21:30 UTC
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 Program Management 2010-06-23 07:42:54 UTC
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 07:55:33 UTC
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 08:04:56 UTC
(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 09:44:58 UTC
I've checked final solution to upstream SVN, rev. 19095.

Comment 8 Karel Srot 2010-07-07 09:12:46 UTC
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 21:12:29 UTC
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.