* fix ignore impossible errorStatus
* fix to reset ErrorStatus==noSuchName on proxyingpull/45/head
parent
c68ca1fedf
commit
c2fa258d32
|
@ -96,6 +96,8 @@ Revision 4.2.6rc0
|
|||
when expanding Notification OBJECTS into Managed Objects Instances.
|
||||
- Missing wrongLength and wrongEncoding SMI errors added.
|
||||
- Fix to file descriptor leak at MibBuilder.
|
||||
- Fix to rfc2576.v2ToV1() to ignore impossible errorStatus.
|
||||
- Fix to rfc2576.v1ToV2() to reset ErrorStatus==noSuchName on proxying.
|
||||
|
||||
Revision 4.2.5
|
||||
--------------
|
||||
|
|
|
@ -152,10 +152,12 @@ def v1ToV2(v1Pdu, origV2Pdu=None):
|
|||
v2VarBinds = [
|
||||
(o, rfc1905.noSuchObject) for o, v in v2VarBinds
|
||||
]
|
||||
|
||||
# one-to-one mapping
|
||||
v2c.apiPDU.setErrorStatus(v2Pdu, errorStatus)
|
||||
v2c.apiPDU.setErrorIndex(v2Pdu, errorIndex)
|
||||
v2c.apiPDU.setErrorStatus(v2Pdu, 0)
|
||||
v2c.apiPDU.setErrorIndex(v2Pdu, 0)
|
||||
else:
|
||||
# partial one-to-one mapping - 4.2.1
|
||||
v2c.apiPDU.setErrorStatus(v2Pdu, errorStatus)
|
||||
v2c.apiPDU.setErrorIndex(v2Pdu, errorIndex)
|
||||
|
||||
# 4.1.2.1 --> no-op
|
||||
|
||||
|
@ -274,7 +276,7 @@ def v2ToV1(v2Pdu, origV1Pdu=None):
|
|||
v2ErrorStatus = v2c.apiPDU.getErrorStatus(v2Pdu)
|
||||
if v2ErrorStatus:
|
||||
v1.apiPDU.setErrorStatus(
|
||||
v1Pdu, __v2ToV1ErrorMap[v2ErrorStatus]
|
||||
v1Pdu, __v2ToV1ErrorMap.get(v2ErrorStatus, 5)
|
||||
)
|
||||
v1.apiPDU.setErrorIndex(v1Pdu, v2c.apiPDU.getErrorIndex(v2Pdu, muteErrors=True))
|
||||
|
||||
|
|
Loading…
Reference in New Issue