trapd ignores snmpTrapAddress varbind in V2C traps

Description

When receiving V2C traps that include the SNMP-COMMUNITY-MIB::snmpTrapAddress
varbind (.1.3.6.1.6.3.18.1.3.0), OpenNMS ignores the varbind and fails to
override the sender of the trap when assigning the event to the target object.

This has the effect of making all forwarded V2C tarps appear to have originated
from the forwarding machine (e.g. another OpenNMS server) instead of from the
original sender of the trap. It also makes it impossible to build a proper SNMP
V2 proxy.

Note that the fowardV1Trap method of SnmpTrapHelper does correctly utilize the
snmpTrapAddress varbind to set the agent-address field of a V1 trap, but only
when translating traps from V2 to V1. So events derived from forwarded SNMP V1
traps do get assigned to the correct object. But there appears to be no way to
do this for forwarded V2 traps.

This bug appears to be present in 1.2.9 as well as 1.3.2.

Environment

Operating System: Linux Platform: PC

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Details

Assignee

Reporter

Labels

Components

Affects versions

Priority

PagerDuty

Created March 30, 2007 at 12:16 PM
Updated September 21, 2021 at 6:23 PM