[SNMP4J] SNMPv1 traps with IPv6 in AgentAddress are dropped

Frank Fock fock at agentpp.com
Tue Mar 22 19:04:54 CET 2011


Hi Pavel,

The IpAddress SMI type is a IPv4 address only.
It cannot be used for IPv6 addresses.
You have to use OctetString for that.

Thus, the code will not be changed. It
works as designed.

Best regards,
Frank

On 22.03.2011 13:29, Pavel Orehov wrote:
> 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
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.snmp4j.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the SNMP4J mailing list