diff options
author | Ilya Etingof <etingof@gmail.com> | 2019-02-25 09:32:56 +0100 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2019-02-25 09:32:56 +0100 |
commit | 0780b2474eefbc3cfb1f2857657dfdd14e1def90 (patch) | |
tree | b322e909af7b1e590ade5b85012fec26ec01dbd4 /pysnmp/entity | |
parent | 9e484d801bf395e6ecd796f42b3eec9e2272f8fb (diff) | |
download | pysnmp-git-0780b2474eefbc3cfb1f2857657dfdd14e1def90.tar.gz |
Fix PDU consistency check in notification originator
Diffstat (limited to 'pysnmp/entity')
-rw-r--r-- | pysnmp/entity/rfc3413/ntforg.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pysnmp/entity/rfc3413/ntforg.py b/pysnmp/entity/rfc3413/ntforg.py index c4e84a53..e73dbf19 100644 --- a/pysnmp/entity/rfc3413/ntforg.py +++ b/pysnmp/entity/rfc3413/ntforg.py @@ -238,7 +238,7 @@ class NotificationOriginator(object): for idx, varBind in enumerate(varBinds[1:]): if varBind[0] == sysUpTime: varBinds[0] = varBind - del varBinds[idx] + del varBinds[idx + 1] break if len(varBinds) < 2: @@ -248,7 +248,7 @@ class NotificationOriginator(object): # Search for and reposition snmpTrapOID if it's elsewhere for idx, varBind in enumerate(varBinds[2:]): if varBind[0] == snmpTrapOID: - del varBinds[idx] + del varBinds[idx + 2] if varBinds[1][0] == snmpTrapOID: varBinds[1] = varBind else: |