Advice to handle a v1 trap PDU in a v3 message?


I came across a malformed trap that puts a v1 trap PDU in an encrypted v3 SNMP message. I contacted the equipment vendor… They were surprisingly receptive, and are quickly working on a fix. However, it might be a nice-to-have feature if SNMP4J could be tolerant of this type of error, since the data is essentially good, just mis-packaged. Luckily, Wireshark was able to expose the problem… See the attached image. I’ll certainly understand if you choose to strictly follow the RFCs instead… Just FYI from the weird, wild, world of SNMP agents.


Hi Chris,

Interesting bug in the agent :wink:. Source of this and similar problems are frameworks that do not check for standard compatibility. In the SNMP world that is unfortunately a rather common issue.

That’s why I will not be “fault” tolerant in such areas, because I think in the long run it causes more problems than it solves.

Best regards