[SNMP4J] SNMPv1 traps with IPv6 in AgentAddress are dropped

Pavel Orehov pavel.orehov at gmail.com
Tue Mar 22 13:29:10 CET 2011


Hi,

I found that SNMPv1 traps with IPv6 address in AgentAddress are dropped and
IOException is thrown from org.snmp4j.IpAddress.decodeBER method:
"IpAddress encoding error, wrong length: 16".

Looking into the code, I see that the simiral issue was fixed in
org.snmp4j.IpAddress.encodeBER method, where 4 right bytes are cutted in
case address in not IPv4 compatible.

So, the question is why not to fix in the same way in decodeBER method and
cut 4 right bytes from address if not IPv4 compatible ?

Thanks,
Pavel



More information about the SNMP4J mailing list