bugMibble MIB Parser - Bugs: bug #8863, Missing symbol import cause error...

 
 

bug #8863: Missing symbol import cause error instead of warning

Submitted by:  None
Submitted on:  Mon 10 May 2004 05:01:36 PM UTC  
 
Severity: 5 - MajorItem Group: Software
Status: FixedPrivacy: Public
Assigned to: Per Cederberg <cederberg>Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Thu 27 May 2004 01:28:22 PM UTC, comment #6:

Version 2.4 has been released. Closing bug.

Per Cederberg <cederberg>
Project AdministratorIn charge of this item.
Wed 26 May 2004 10:29:25 PM UTC, comment #5:

Fixed. A new recovery mechanism has been added when looking up symbol, searching in all imported MIBs if a symbols is not found in the explicit import list.

This fix will be released in version 2.4 (soon).

Per Cederberg <cederberg>
Project AdministratorIn charge of this item.
Tue 11 May 2004 08:38:07 PM UTC, comment #4:

This issue was previously mentioned in bug #7113, but I'll keep the two bugs separate for clarity. Also modified the bug summary to describe the issue better.

Per Cederberg <cederberg>
Project AdministratorIn charge of this item.
Tue 11 May 2004 08:30:12 PM UTC, comment #3:

Ok, I can confirm that this is a bug. I was appearently doing some wishful thinking while writing my previous comment, as that is not exacly how Mibble works. At least that is what I found out now that I actually sat down and read the code again... :-)

Mibble does indeed ignore the export declaration. However, when looking up symbols inside a MIB file, it explicitly only finds symbols that have been imported. It's a trivial piece of code to fix, and I must have written it a day when I was feeling particularily pedantic. See MibReference.java at line 143-144:

} else if (symbols != null && !symbols.contains(name)) {
return null;

By commenting these two lines out, Mibble will effectively ignore whatever symbols were listed in the IMPORT declaration and assume that all symbols were imported. This may of course cause problems if the same symbol name is declared in two different MIB files both on the import list, but that should be a very rare situation.

The other workaround is of course to correct the MIB files in question and include the missing import.

The next version of Mibble will include a proper fix for this issue, issuing a warning in case a symbol was used but not imported.

Per Cederberg <cederberg>
Project AdministratorIn charge of this item.
Mon 10 May 2004 08:53:57 PM UTC, comment #2:

I was looking at the Motorola MIB definition of one of their device with following import statements:

IMPORTS
IpAddress, TimeTicks FROM RFC1155-SMI

The RFC1155-SMI also contains definition of the "Counter" object type, which was not imported explicitly but was used in the motorola mib file.

The following export declaration from RFC1155-SMI
EXPORTS -- EVERYTHING
internet, directory, mgmt,
experimental, private, enterprises,
OBJECT-TYPE, ObjectName, ObjectSyntax, SimpleSyntax,
ApplicationSyntax, NetworkAddress, IpAddress,
Counter, Gauge, TimeTicks, Opaque;

I got a Mib load error on motorola mib trying to find "Counter". I only add the directory which contains the MIB file to the MIB search path and do not explictly load the RFC1155-SMI mib file before loading the motorola mib. I have had to modify the motorola mib to import definition of object type "Counter" for it to work.

I would think that the ideal behavior should be that when importing a definition from another mib file, references of all the exports should be created, so that if any exported object type is not explicitly imported, it should not cause an error.

Vivek S Srivastav <yantriki>
Mon 10 May 2004 07:01:18 PM UTC, comment #1:

I don't understand what you mean with this bug. It is true that the EXPORT clause is ignored, using an EXPORT ALL policy instead. Mibble was designed this way to avoid problems with the many MIB files that do not properly export all the symbols they mean to export. Are you having problems with the import mechanism?

Granted, it should be possible to parse files in a strict mode where things such as importing a non-exported symbol should cause a warning. See bug #4367 and bug #7113 for more information about this idea.

Per Cederberg <cederberg>
Project AdministratorIn charge of this item.
Mon 10 May 2004 05:01:36 PM UTC, original submission:

If an imported MIB contains EXPORT clause all such definition should be available in the importing MIB files. mibble 2.2 throws an exception not found.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 5 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 27 May 2004 01:28:11 PM UTCcederbergOpen/ClosedOpen=>Closed
Wed 26 May 2004 10:29:25 PM UTCcederbergStatusNone=>Fixed
Tue 11 May 2004 08:38:07 PM UTCcederbergSummaryThe "EXPORT" clause in the imported mib files are being ignored=>Missing symbol import cause error instead of warning
Tue 11 May 2004 08:30:12 PM UTCcederbergAssigned toNone=>cederberg
Mon 10 May 2004 08:55:29 PM UTCyantrikiCarbon-Copy-=>Added vsrivastav --AT-- optinel --DOT-- com

Back to the top


Powered by Savane 3.1-cleanup