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