summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2017-03-11 23:23:18 +0100
committerIlya Etingof <etingof@gmail.com>2017-03-11 23:23:18 +0100
commitdc3f3236bb4da41a1ac47786ff9333f9a620cc89 (patch)
tree4fc5a079acf89d87f23571a8a2ee19ce46163792
parent47108412ee6b5ec5d7134df3cfb6e14ba706df62 (diff)
downloadpysnmp-git-dc3f3236bb4da41a1ac47786ff9333f9a620cc89.tar.gz
fix to accidentally reset error-status field in SNMPv1 PDU
-rw-r--r--CHANGES.txt2
-rw-r--r--pysnmp/proto/mpmod/rfc2576.py1
-rw-r--r--pysnmp/proto/rfc1905.py3
3 files changed, 4 insertions, 2 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 83498ae6..392b5c26 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -4,6 +4,8 @@ Revision 4.3.5, released 2017-0X-XX
- The getNext() and getBulk() calls of Twisted interface
now support ignoreNonIncreasingOid option.
+- Fix to accidentally reset error-status when building confirmed class
+ SNMPv1 PDU
Revision 4.3.4, released 2017-03-01
-----------------------------------
diff --git a/pysnmp/proto/mpmod/rfc2576.py b/pysnmp/proto/mpmod/rfc2576.py
index 668eade2..0200c825 100644
--- a/pysnmp/proto/mpmod/rfc2576.py
+++ b/pysnmp/proto/mpmod/rfc2576.py
@@ -37,7 +37,6 @@ class SnmpV1MessageProcessingModel(AbstractMessageProcessingModel):
# rfc3412: 7.1.1b
if pdu.tagSet in rfc3411.confirmedClassPDUs:
# serve unique PDU request-id
- pdu.setComponentByPosition(1)
msgID = self._cache.newMsgID()
reqID = pdu.getComponentByPosition(0)
debug.logger & debug.flagMP and debug.logger(
diff --git a/pysnmp/proto/rfc1905.py b/pysnmp/proto/rfc1905.py
index 6a816b1f..f2866343 100644
--- a/pysnmp/proto/rfc1905.py
+++ b/pysnmp/proto/rfc1905.py
@@ -89,7 +89,8 @@ errorStatus = univ.Integer(
('wrongEncoding', 9), ('wrongValue', 10), ('noCreation', 11),
('inconsistentValue', 12), ('resourceUnavailable', 13), ('commitFailed', 14),
('undoFailed', 15), ('authorizationError', 16), ('notWritable', 17),
- ('inconsistentName', 18)))
+ ('inconsistentName', 18))
+ )
# Base class for a non-bulk PDU