Dear net-snmp-coders,

I found a bug in parse_one_oid_index() in snmplib/mib.c, this function
doesn't work when using ASN_PRIV_IMPLIED_OCTET_STR for MacAddress that is
not the last object in the INDEX, for example, dot1qStaticMulticastAddress
in dot1qStaticMulticastTable.

Output of ASN_PRIV_IMPLIED_OCTET_STR for dot1qStaticMulticastAddress case:
helper:table:req: Got request for handler table: base
oid:.1.3.6.1.2.1.17.7.1.3.2
helper:table:col:   have at least a column (5)
helper:table:     have 8 bytes of index
helper:table:   looking for 3 indexes
parse_oid_indexes: Parsed int(66): 1
helper:table:   got 1 (incomplete=0)
parse_oid_indexes: Parsed str(196): ☺
helper:table:   got 1 (incomplete=0)
helper:table:   oid indexes not complete:
.1.3.6.1.2.1.17.7.1.3.2.1.5.1.1.0.0.0.0.1.0
helper:table:results:   found 264916960 indexes
helper:table: invalid index(es) for table - skipping

For comparision purpose, here is the output when the address is
ASN_OCTET_STR type, it works okay in this case:
helper:table:req: Got request for handler table: base
oid:.1.3.6.1.2.1.17.7.1.3.1
helper:table:col:   have at least a column (4)
helper:table:     have 9 bytes of index
helper:table:   looking for 3 indexes
parse_oid_indexes: Parsed int(66): 1
helper:table:   got 1 (incomplete=0)
parse_oid_indexes: Parsed str(4): ☻
helper:table:   got 1 (incomplete=0)
parse_oid_indexes: Parsed int(2): 0
helper:table:   got 1 (incomplete=0)
helper:table:results:   found 3 indexes
helper:table:results:   column: 4, indexes: 3   index: type=66(42),
value=Gauge32: 1   ind
ex: type=4(04), value=Hex-STRING: 02 00 00 00 00 01
   index: type=2(02), value=INTEGER: 0

Thanks for your support.
EmiN�HY޵隊X���'���u���[�������
ަ�k��!���W�~�鮆�zk��C� [EMAIL PROTECTED],����a{���,�H��4�m���i�(��ܢo�v'

Reply via email to