I've run into a possible problem in SVN version of libsmi. I have not done
any debugging, so this is just a bug report:
When I do:
smidump -f python TCP-MIB.txt
for the following MIB text:
tcpMaxConn OBJECT-TYPE
SYNTAX Integer32 (-1 | 0..2147483647)
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The limit on the total number of TCP connections the entity
can support. In entities where the maximum number of
connections is dynamic, this object should contain the
value -1."
::= { tcp 4 }
smidump generates:
"tcpMaxConn" : {
"nodetype" : "scalar",
"moduleName" : "TCP-MIB",
"oid" : "1.3.6.1.2.1.6.4",
"status" : "current",
"syntax" : {
"type" : {
"basetype" : "Integer32",
"ranges" : [
{
"min" : "-1",
"max" : "2147483647"
},
],
"range" : {
"min" : "4294967295",
"max" : "2147483647"
},
},
},
"access" : "readonly",
"description" :
""" [skipped] """,
}, # scalar
Where range constraints seem to be broken at:
1. Range minimum (0) gets converted into 4294967295.
2. Single value constraint (-1) gets translated into a value
range constraint with wildly inflated upper range (2147483647).
Current stable release (0.4.5) behaves differently (yet, incorrectly) in
this respect:
"tcpMaxConn" : {
"nodetype" : "scalar",
"moduleName" : "TCP-MIB",
"oid" : "1.3.6.1.2.1.6.4",
"status" : "current",
"syntax" : {
"type" : {
"basetype" : "Integer32",
"range" : {
"min" : "-1",
"max" : "2147483647"
},
},
},
"access" : "readonly",
"description" :
""" [skipped] """,
}, # scalar
Is there currently a fix for this issue?
Thanks,
ilya