summaryrefslogtreecommitdiff
path: root/pysnmp/proto
diff options
context:
space:
mode:
authorelie <elie>2014-01-25 15:59:17 +0000
committerelie <elie>2014-01-25 15:59:17 +0000
commit219fedac62d83b74edcc5544a3a16d821f3f723d (patch)
tree97538a24b612c4dc4a607762d679fac08ef77147 /pysnmp/proto
parent11f0641e215a8680441404e97582fab3f8a8d26f (diff)
downloadpysnmp-219fedac62d83b74edcc5544a3a16d821f3f723d.tar.gz
observer call added to processIncomingMsg()
Diffstat (limited to 'pysnmp/proto')
-rw-r--r--pysnmp/proto/secmod/rfc2576.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/pysnmp/proto/secmod/rfc2576.py b/pysnmp/proto/secmod/rfc2576.py
index f98793e..7210ad8 100644
--- a/pysnmp/proto/secmod/rfc2576.py
+++ b/pysnmp/proto/secmod/rfc2576.py
@@ -385,9 +385,20 @@ class SnmpV1SecurityModel(base.AbstractSecurityModel):
# rfc2576: 5.2.1
( communityName, transportInformation ) = securityParameters
+ scope = dict(communityName=communityName,
+ transportInformation=transportInformation)
+
+ snmpEngine.observer.storeExecutionContext(
+ snmpEngine,
+ 'rfc2576.processIncomingMsg:writable',
+ scope
+ )
+
try:
securityName, contextEngineId, contextName = self._com2sec(
- snmpEngine, communityName, transportInformation
+ snmpEngine,
+ scope.get('communityName', communityName),
+ scope.get('transportInformation', transportInformation)
)
except error.StatusInformation:
snmpInBadCommunityNames, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMPv2-MIB', 'snmpInBadCommunityNames')
@@ -404,12 +415,12 @@ class SnmpV1SecurityModel(base.AbstractSecurityModel):
stateReference = self._cache.push(
communityName=communityName
- )
+ )
scopedPDU = (
contextEngineId, contextName,
msg.getComponentByPosition(2).getComponent()
- )
+ )
maxSizeResponseScopedPDU = maxMessageSize - 128
securityStateReference = stateReference