fix to SNMPv1 PDU handling

pull/45/head
elie 2010-09-23 06:20:06 +00:00
parent e8d075d277
commit 0516153a62
3 changed files with 17 additions and 7 deletions

View File

@ -1,17 +1,19 @@
Revision 4.1.15a
----------------
- Fix to Opaque value tagging at rfc1155.Opaque type.
- Fix to handle (fail gracefully) zero-length user password.
- Fix to SNMP error propagation at Twisted driver (SF tracker ID #3054505).
- Lexicographic walking mode is now supported at oneliner CommandGenerator.
- ContextEngineId&ContextName parameters passing implemented at
v3arch oneliner API.
- Multiple instances of the same transport domain now supported.
- Default snmpEngineId value generation improved not to accidentally
conflict within an administrative domain.
- Initial snmpEngineId value generation improved not to accidentally
collide within an administrative domain.
- Fix to Opaque value tagging at rfc1155.Opaque type.
- Fix to handle (fail gracefully) zero-length user password.
- Fix to SNMP error propagation at Twisted driver (SF tracker ID #3054505).
- Fix to Agent-role snmpEngineId discovery procedure that allows
authenticated ReportPDU generation.
- Fix to SNMPv1 PDU handling at CommandResponder & NotificationReceiver
apps.
Revision 4.1.14a
----------------

View File

@ -36,6 +36,7 @@ class CommandResponderBase:
contextName,
pduVersion,
PDU,
origPdu,
maxSizeResponseScopedPDU,
statusInformation ) = self.__pendingReqs[stateReference]
@ -49,7 +50,7 @@ class CommandResponderBase:
# Agent-side API complies with SMIv2
if messageProcessingModel == 0:
PDU = rfc2576.v2ToV1(PDU)
PDU = rfc2576.v2ToV1(PDU, origPdu)
# 3.2.6
try:
@ -93,7 +94,10 @@ class CommandResponderBase:
# Agent-side API complies with SMIv2
if messageProcessingModel == 0:
origPdu = PDU
PDU = rfc2576.v1ToV2(PDU)
else:
origPdu = None
# 3.2.1
if rfc3411.readClassPDUs.has_key(PDU.tagSet):
@ -119,6 +123,7 @@ class CommandResponderBase:
contextName,
pduVersion,
rspPDU,
origPdu,
maxSizeResponseScopedPDU,
statusInformation
)

View File

@ -41,7 +41,10 @@ class NotificationReceiver:
# Agent-side API complies with SMIv2
if messageProcessingModel == 0:
origPdu = PDU
PDU = rfc2576.v1ToV2(PDU)
else:
origPdu = None
errorStatus = 'noError'; errorIndex = 0
varBinds = v2c.apiPDU.getVarBinds(PDU)
@ -63,7 +66,7 @@ class NotificationReceiver:
# Agent-side API complies with SMIv2
if messageProcessingModel == 0:
rspPDU = rfc2576.v2ToV1(rspPDU)
rspPDU = rfc2576.v2ToV1(rspPDU, origPdu)
statusInformation = {}