[SNMP4J] SNMPv1 traps with IPv6 in AgentAddress are dropped

Pavel Orehov pavel.orehov at gmail.com
Wed Mar 23 10:45:58 CET 2011


Hi Frank,

You are right. It works as expected. However, there are many devices that
sends IPv6 in AgentAddress and SNMP4J drops them.

My suggestion was only to do the same workaround as in encode method in
order to support such devices.

Or at least give SNMP4J users to decide by exposing some API to
enable/disable that workaround.

Thanks,
Pavel

On Tue, Mar 22, 2011 at 8:04 PM, Frank Fock <fock at agentpp.com> wrote:

> 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
>
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j
>



More information about the SNMP4J mailing list