diff options
author | Ilya Etingof <etingof@gmail.com> | 2017-03-22 02:06:23 +0100 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2017-03-22 02:06:23 +0100 |
commit | e9eca3a5501417b106e6e9449bbe2d1648f6446f (patch) | |
tree | f7b2b48bdd611dc184f44f23565c0e0fad1d62a6 /pysnmp/proto | |
parent | 774dff0e3546baca37ba38591878a317eb6da8bc (diff) | |
download | pysnmp-git-e9eca3a5501417b106e6e9449bbe2d1648f6446f.tar.gz |
fixed crash when unknown PDU reporting is attempted
Diffstat (limited to 'pysnmp/proto')
-rw-r--r-- | pysnmp/proto/rfc3412.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/pysnmp/proto/rfc3412.py b/pysnmp/proto/rfc3412.py index d65019d3..97dca0ae 100644 --- a/pysnmp/proto/rfc3412.py +++ b/pysnmp/proto/rfc3412.py @@ -361,8 +361,6 @@ class MsgAndPduDispatcher(object): debug.logger & debug.flagDsp and debug.logger('receiveMessage: unhandled PDU type') - # XXX fails on unknown PDU - try: (destTransportDomain, destTransportAddress, @@ -374,7 +372,7 @@ class MsgAndPduDispatcher(object): statusInformation ) - except error.StatusInformation: + except (error.StatusInformation, error.ProtocolError): debug.logger & debug.flagDsp and debug.logger( 'receiveMessage: report failed, statusInformation %s' % sys.exc_info()[1]) return restOfWholeMsg |