diff options
author | Eugene M. Kim <astralblue@gmail.com> | 2017-10-23 03:24:22 -0700 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2017-10-23 12:24:22 +0200 |
commit | f6f0bb9e519db79b8731348986aab8153bfc9cf8 (patch) | |
tree | 2cc2038aa450561cac4286f354d59bfcaa1d6225 | |
parent | a5420fd95d6d3e5e1f426a199b355fd017c5465f (diff) | |
download | pysnmp-git-f6f0bb9e519db79b8731348986aab8153bfc9cf8.tar.gz |
Fix non-implied-OID-to-index conversion (#98)
Non-implied OIDs, when laid in index, should be prefixed with the length
of the OID, but the current code erroneously uses len(self.name), that
is, the length of the MibTableRow's name instead.
-rw-r--r-- | pysnmp/smi/mibs/SNMPv2-SMI.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pysnmp/smi/mibs/SNMPv2-SMI.py b/pysnmp/smi/mibs/SNMPv2-SMI.py index 8c472798..24d0ddee 100644 --- a/pysnmp/smi/mibs/SNMPv2-SMI.py +++ b/pysnmp/smi/mibs/SNMPv2-SMI.py @@ -1045,7 +1045,7 @@ class MibTableRow(MibTree): if impliedFlag: return tuple(obj) else: - return (len(self.name),) + tuple(obj) + return (len(obj),) + tuple(obj) # rfc2578, 7.1 elif baseTag == self.__bitsBaseTag: return (len(obj),) + obj.asNumbers() |