Closed vvsosed closed 1 year ago
There seems to be two problems,
This is a comment in the code regarding netsnmp support:
Athough smidump translates TruthValue to boolean
* and there is an ASN_BOOLEAN constant:
* 1) there is no code for ASN_BOOLEAN and
* 2) Truthvalue actually translates to enum true(1)/false(0)
Would it be OK to fix the first false problem, since the second seems to be absent from the libnetsmp code available. But I need to revisit that to be sure.
@olofhagsand I tested now with a some network equipment (Netgear swtich), and looks like they are representing it as an INTEGER too:
...
IF-MIB::ifConnectorPresent.939 = INTEGER: false(2)
...
So probably the main bug is that false is 0 instead of 2.
Successfully fixed, thanks!
We use definition like
leaf ifConnectorPresent { type boolean; description "This object has the value 'true(1)' if the interface sublayer has a physical connector and the value 'false(2)' otherwise."; smiv2:max-access "read-only"; smiv2:oid "1.3.6.1.2.1.31.1.1.1.17"; }
but unfortunately, we are able to see snmpwalk output like IF-MIB::ifConnectorPresent.5 = INTEGER: true(1) IF-MIB::ifConnectorPresent.7 = INTEGER: 0 According to RFC-1212 we should see IF-MIB::ifConnectorPresent.5 = BOOLEAN: true(1) IF-MIB::ifConnectorPresent.7 = BOOLEAN: false(2) I suspect that problem happens because the CLIXON SNMP module uses integer type to support SNMP boolean value.