summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelie <elie>2012-04-04 14:10:23 +0000
committerelie <elie>2012-04-04 14:10:23 +0000
commitcbf539243ee5c85655cf77be4189f973b9c0512b (patch)
tree1bd64605685da13ecfe75cf6dd5e3ce4a5e09aec
parent1e98622aec3c9c1c57ec328845f203f190d50fe2 (diff)
downloadpysnmp-cbf539243ee5c85655cf77be4189f973b9c0512b.tar.gz
fix to api.v2c.getVarBindTable() to ignore possible non-rectangular
GETBULK response tables
-rw-r--r--CHANGES4
-rw-r--r--pysnmp/proto/api/v2c.py4
2 files changed, 6 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index 76573eb..a6303a0 100644
--- a/CHANGES
+++ b/CHANGES
@@ -28,13 +28,15 @@ Revision 4.2.2
- Out of PYTHONPATH MIB paths now supported.
- Fix to setEndOfMibError()/setNoSuchInstanceError() at v1 PDU not to
loose errorIndex.
+- Fix to api.v2c.getVarBindTable() to ignore possible non-rectangular GETBULK
+ response tables.
- Fix to oneliner getnext/getbulk response table rectangulation procedure
to gracefully handle an empty column condition.
- Fix to legacy MibBuilder.getMibPath() to prevent it from missing
.egg-based components in path.
- Fix to oneliner configuration routine that used to implicitly
tag SNMPv1/v2c auth and transport LCD rows what resulted in
- huge delays when processing incoming messages wish large number
+ huge delays when processing incoming messages with large number
of peers configured.
- Fix to UDP6 transport handling at rfc2576 security module.
- Fix to SnmpEngineID value autogeneration (used to fail on Mac).
diff --git a/pysnmp/proto/api/v2c.py b/pysnmp/proto/api/v2c.py
index cfaa125..a66287b 100644
--- a/pysnmp/proto/api/v2c.py
+++ b/pysnmp/proto/api/v2c.py
@@ -96,7 +96,9 @@ class BulkPDUAPI(PDUAPI):
if R:
for i in range(0, len(rspVarBinds)-N, R):
varBindRow = rspVarBinds[:N] + rspVarBinds[N+i:N+R+i]
- varBindTable.append(varBindRow)
+ # ignore stray OIDs / non-rectangular table
+ if len(varBindRow) == N + R:
+ varBindTable.append(varBindRow)
elif N:
varBindTable.append(rspVarBinds[:N])