smidump --format=smiv2 output contains some errors in compliance SYNTAX/WRITE-SYNTAX clauses.

Hello,
I just stumbled over the following problem in libsmi 0.4.8 and development trunk-tip rev34557 (as of today). The problem resides in the SYNTAX/WRITE-SYNTAX clauses in COMPLIANCE statements. Instead of a "type" the invalid term "(null)" is present.
AFFECTED-MIBS (at least): - BRIDGE-MIB - SNMP-VIEW-BASED-ACM-MIB - ... => grep "(null)" *-MIB
EXAMPLE: smidump --format=smiv2 BRIDGE-MIB ... OBJECT dot1dStpPriority SYNTAX (null) (0 | 4096 | 8192 | 12288 | 16384 | 20480 | 24576 | 28672 | 32768 | 36864 | 40960 | 45056 | 49152 | 53248 | 57344 | 61440) ... OBJECT dot1dStpPortPriority SYNTAX (null) (0 | 16 | 32 | 48 | 64 | 80 | 96 | 112 | 128 | 144 | 160 | 176 | 192 | 208 | 224 | 240)
BUT: Original BRIDGE-MIB that is distributed w/ libsmi contains: OBJECT dot1dStpPriority SYNTAX Integer32 (0 | 4096 | 8192 | 12288 | 16384 | 20480 | 24576 | 28672 | 32768 | 36864 | 40960 | 45056 | 49152 | 53248 | 57344 | 61440) ... OBJECT dot1dStpPortPriority SYNTAX Integer32 (0 | 16 | 32 | 48 | 64 | 80 | 96 | 112 | 128 | 144 | 160 | 176 | 192 | 208 | 224 | 240)
smidump --format=smiv2 SNMP-VIEW-BASED-ACM-MIB ... OBJECT vacmViewTreeFamilyMask WRITE-SYNTAX (null) (SIZE(0)) ...
SHOULD-BE (as in original MIB distributed with libsmi): ... OBJECT vacmViewTreeFamilyMask WRITE-SYNTAX OCTET STRING (SIZE(0))
I assume that smidump does not have the info (only a NULL pointer) and just dumps it as textual info. NOTE: "smidiff <ORIGINAL-MIB> <SMIDUMPED-MIB>" does not seem to show a difference (except warnings, ...).
Ciao, Jens

Jens Engel wrote:
Hello,
I just stumbled over the following problem in libsmi 0.4.8 and development trunk-tip rev34557 (as of today).
This must have existed at rev16122 because I can demonstrate it with that version.
The problem resides in the SYNTAX/WRITE-SYNTAX clauses in COMPLIANCE statements. Instead of a "type" the invalid term "(null)" is present.
AFFECTED-MIBS (at least):
- BRIDGE-MIB
- SNMP-VIEW-BASED-ACM-MIB
- ...
=> grep "(null)" *-MIB
EXAMPLE: smidump --format=smiv2 BRIDGE-MIB ... OBJECT dot1dStpPriority SYNTAX (null) (0 | 4096 | 8192 | 12288 | 16384 | 20480 | 24576 | 28672 | 32768 | 36864 | 40960 | 45056 | 49152 | 53248 | 57344 | 61440)
If you dump BRIDGE-MIB as v1 that clause appears as:
-- OBJECT dot1dStpPriority -- SYNTAX (null) (0 | 4096 | 8192 | 12288 | 16384 | 20480 | 24576 | 28672 | 32768 | 36864 | 40960 | 45056 | 49152 | 53248 | 57344 | 61440)
only the first line is commented.

On Sun, Mar 27, 2011 at 04:42:43PM +0200, Jens Engel wrote:
Hello,
I just stumbled over the following problem in libsmi 0.4.8 and development trunk-tip rev34557 (as of today). The problem resides in the SYNTAX/WRITE-SYNTAX clauses in COMPLIANCE statements. Instead of a "type" the invalid term "(null)" is present.
AFFECTED-MIBS (at least):
- BRIDGE-MIB
- SNMP-VIEW-BASED-ACM-MIB
- ...
=> grep "(null)" *-MIB
I finally got around to fix this. Here is what I get now:
OBJECT dot1dStpPriority SYNTAX Integer32 (0 | 4096 | 8192 | 12288 | 16384 | 20480 | 24576 | 28672 | 32768 | 36864 | 40960 | 45056 | 49152 | 53248 | 57344 | 61440) DESCRIPTION "The possible values defined by IEEE 802.1t."
OBJECT dot1dStpPortPriority SYNTAX Integer32 (0 | 16 | 32 | 48 | 64 | 80 | 96 | 112 | 128 | 144 | 160 | 176 | 192 | 208 | 224 | 240) DESCRIPTION "The possible values defined by IEEE 802.1t."
/js
participants (3)
-
Andrew Hood
-
Jens Engel
-
Juergen Schoenwaelder