Issue 13 in pycopia: agent address not being picked up correctly from SNMPv1 traps

5 views
Skip to first unread message

pyc...@googlecode.com

unread,
Feb 6, 2015, 3:51:47 PM2/6/15
to pyc...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 13 by mgreat...@gmail.com: agent address not being picked up
correctly from SNMPv1 traps
https://code.google.com/p/pycopia/issues/detail?id=13

What module are you referring to?
pycopia/SNMP/traps.py

What operating system?
N/A

Please provide any additional information below.

The existing code blindly uses the IP address from the header regardless of
whether the agent-address was extracted from the trap (SNMPv1)
To fix I simply tweaked the code to use the agent address from the trap if
it exists. Here is the diff.


$ diff traps.py ~/Source/pycopia-read-only/SNMP/pycopia/SNMP/traps.py
75,79c75
< try:
< varbinds.append(snmpTrapAddress(pdu.agent).varbind)
< except AttributeError:
< varbinds.append(snmpTrapAddress(ip).varbind)
<
---
> varbinds.append(snmpTrapAddress(ip).varbind)

Thanks.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

pyc...@googlecode.com

unread,
Feb 8, 2015, 3:20:08 PM2/8/15
to pyc...@googlegroups.com
Updates:
Status: Fixed
Owner: keith.d...@gmail.com

Comment #1 on issue 13 by keith.d...@gmail.com: agent address not being
picked up correctly from SNMPv1 traps
https://code.google.com/p/pycopia/issues/detail?id=13

Ok, thanks for the patch. I just applied it to the code. :)
Reply all
Reply to author
Forward
0 new messages