bugMibble MIB Parser - Bugs: bug #5904, Auto-numbering undefined Sequence...

 
 

bug #5904: Auto-numbering undefined Sequence elements

Submitter:  None
Submitted:  Mon 13 Oct 2003 01:56:09 AM UTC
   
 
Severity:  2 - Normal Item Group:  Software
Status:  Fixed Privacy:  Public
Assigned to:  cederberg Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 03 Nov 2003 11:32:13 AM UTC, comment #3: 

Version 2.2 has been released with a fix for this issue.

Per Cederberg <cederberg>
Group administrator
Tue 21 Oct 2003 10:39:11 PM UTC, comment #2: 

Thanks to the very detailed bug report, this has now been fixed. Sequences used inside OBJECT TYPE:s have their elements checked against the MIB, and any missing element is added to the MIB with reasonable default values. A loader warning is also issued when creating new symbols like this.

This validation check has found errors in RFC 1243 and RFC 1253 that have also been corrected.

This fix will be released in version 2.2.

Per Cederberg <cederberg>
Group administrator
Mon 13 Oct 2003 07:12:14 AM UTC, comment #1: 

Hmm... This is problematic. Currently the contents of a SEQUENCE are treated as type information only. Mibble does not attempt to make any connection between the sequence element name and any defined or undefined value symbol. See the ElementType class to see what I mean.

The reason for the three sub-OID:s to be registered is completely caused by the symbol definitions in other places in the MIB file. It looks like they are related, but Mibble is ignorant about it.

So, the solution here would probably be to enforce a link between the ElementType name and a MIB value symbol. If a link couldn't be established by resolving symbols, then a fake symbol could be created with an OID from the sequence position. From your example it seems like that is what the snmptrap daemon actually does.

Opinions?

Per Cederberg <cederberg>
Group administrator
Mon 13 Oct 2003 01:56:09 AM UTC, original submission:  

Sequence elements with a defined type but no defined
left-hand symbol should be assigned a default symbol name based on the enclosing Sequence's OID.

Example:

--Defined symbols:
--
-- nncAlmDateAndTime
-- nncAlmPriority
-- nncAlmText

--Undefined Symbols:
--
-- nncAlmSubcode
-- nncAlmParms

.
.
.

   nncAlmInfo        OBJECT-TYPE
                 SYNTAX  SEQUENCE OF NncAlmInfo
                 MAX-ACCESS  not-accessible
                 STATUS  current
                 DESCRIPTION
                   "Alarm information shared by all alarm trap types."
                 ::= { nncExtNotifObjects 2 }

   NncAlmInfo        ::= SEQUENCE {
                     nncAlmDateAndTime         TimeTicks,
                     nncAlmPriority       AlmPriorityType,
                     nncAlmText                StringType,
                     nncAlmSubcode             StringType,
                     nncAlmParms      ParameterStringType
                  }

-- Discussion

The undefined symbols (nncAlmSubcode and nncAlmParms) in the sequence are shown in Java via:

mibvalsym.getValue().toString()

where mibvalsym is the nncAlmInfo ObjectIdentifierValue. The toString() resolves to:

OBJECT-TYPE (
  Syntax: SEQUENCE OF SEQUENCE [nncAlmDateAndTime INTEGER (0..4294967295), nncAl
mPriority TEXTUAL-CONVENTION (
  Status: current
  Description: Different alarm priorities.
  Syntax: INTEGER (1 | 2 | 3 | 4)
), nncAlmText TEXTUAL-CONVENTION (
  Status: current
  Description: Types used to forward various text fields.
  Syntax: OCTET STRING (SIZE (0..30))
), nncAlmSubcode TEXTUAL-CONVENTION (
  Status: current
  Description: Types used to forward various text fields.
  Syntax: OCTET STRING (SIZE (0..30))
), nncAlmParms TEXTUAL-CONVENTION (
  Status: current
  Description: Types used to forward various text fields.
  Syntax: OCTET STRING (SIZE (0..40))
)[
  Access: not-accessible
  Status: current
  Description: Alaram information shared by all alarm trap types.


The child count in the sequence's ObjectIdentifierValue is three instead of five, which means that the unknown input element's objects where not created.


In contrast, using snmptrap daemon (from NET-SNMP, formerly UCD-SNMP) under Linux, the trapdaemon's ASN.1 analyser fills in missing nams with the parent sequence's OID plus the missing symbol's position:

.
.
.1.3.6.1.4.1.123.3.44.1.2.1 --> nncAlmDateAndTime == 122:21:52:09.33
.1.3.6.1.4.1.123.3.44.1.2.2 --> nncAlmPriority == 3
.1.3.6.1.4.1.123.3.44.1.2.3 --> nncAlmText == "PVC Active S1"
.1.3.6.1.4.1.123.3.44.1.2.4 --> nncAlmInfo.4 == "S1 1,39 "
.1.3.6.1.4.1.123.3.44.1.2.5 --> nncAlmInfo.5 == "1,39 "

-----------

Reason for bringing this up: external customers can load arbitrary MIBs and the java code is expected to see and manipulate the "missing" entries.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 4 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2003-11-03 cederberg Open/ClosedOpen None
2003-10-21 cederberg StatusNone None
2003-10-13 cederberg Severity5 - Major None
    Assigned toNone None

Back to the top

Powered by Savane 3.14-1244.
Corresponding source code