net-snmp 3.5.3 → 3.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/index.js +15 -5
- package/package.json +1 -1
package/README.md
CHANGED
@@ -3146,6 +3146,22 @@ Example programs are included under the module's `example` directory.
|
|
3146
3146
|
|
3147
3147
|
* Fix error with empty varbind array in walk
|
3148
3148
|
|
3149
|
+
## Version 3.5.4 - 24/08/2021
|
3150
|
+
|
3151
|
+
* Align accessible-for-notify row cell behaviour with not-accessible behaviour
|
3152
|
+
|
3153
|
+
## Version 3.5.5 - 29/09/2021
|
3154
|
+
|
3155
|
+
* Add missing return in getbulk feedCb callback non-repeaters error condition
|
3156
|
+
|
3157
|
+
## Version 3.5.6 - 20/10/2021
|
3158
|
+
|
3159
|
+
* Fix GetNext OID calculation for off-tree OIDs
|
3160
|
+
|
3161
|
+
## Version 3.5.7 - 20/11/2021
|
3162
|
+
|
3163
|
+
* Fix handing of null varbinds in walk
|
3164
|
+
|
3149
3165
|
# License
|
3150
3166
|
|
3151
3167
|
Copyright (c) 2020 Mark Abrahams <mark@abrahams.co.nz>
|
package/index.js
CHANGED
@@ -1923,6 +1923,7 @@ Session.prototype.getBulk = function () {
|
|
1923
1923
|
+ "response '" + pdu.varbinds.length + "' is less than "
|
1924
1924
|
+ "non-repeaters '" + nonRepeaters + "' in request",
|
1925
1925
|
ResponseInvalidCode.ENonRepeaterCountMismatch));
|
1926
|
+
return;
|
1926
1927
|
} else {
|
1927
1928
|
for ( ; i < nonRepeaters; i++) {
|
1928
1929
|
if (isVarbindError (pdu.varbinds[i])) {
|
@@ -2641,7 +2642,7 @@ function walkCb (req, error, varbinds) {
|
|
2641
2642
|
}
|
2642
2643
|
}
|
2643
2644
|
|
2644
|
-
if ( ! varbinds.length ) {
|
2645
|
+
if ( ! varbinds || ! varbinds.length ) {
|
2645
2646
|
req.doneCb(null);
|
2646
2647
|
return;
|
2647
2648
|
}
|
@@ -3491,7 +3492,7 @@ MibNode.prototype.findChildImmediatelyBefore = function (index) {
|
|
3491
3492
|
}
|
3492
3493
|
}
|
3493
3494
|
}
|
3494
|
-
return this.children[sortedChildrenKeys[sortedChildrenKeys.length]];
|
3495
|
+
return this.children[sortedChildrenKeys[sortedChildrenKeys.length - 1]];
|
3495
3496
|
};
|
3496
3497
|
|
3497
3498
|
MibNode.prototype.isDescendant = function (address) {
|
@@ -3823,7 +3824,16 @@ Mib.prototype.getTreeNode = function (oid) {
|
|
3823
3824
|
var last = address.pop ();
|
3824
3825
|
var parent = this.lookupAddress (address);
|
3825
3826
|
if ( parent ) {
|
3826
|
-
|
3827
|
+
node = parent.findChildImmediatelyBefore (last);
|
3828
|
+
if ( !node )
|
3829
|
+
return parent;
|
3830
|
+
while ( true ) {
|
3831
|
+
// Find the last descendant
|
3832
|
+
var childrenAddresses = Object.keys (node.children).sort ( (a, b) => a - b);
|
3833
|
+
if ( childrenAddresses.length == 0 )
|
3834
|
+
return node;
|
3835
|
+
node = node.children[childrenAddresses[childrenAddresses.length - 1]];
|
3836
|
+
}
|
3827
3837
|
}
|
3828
3838
|
}
|
3829
3839
|
return this.root;
|
@@ -4203,8 +4213,8 @@ Mib.prototype.addTableRow = function (table, row) {
|
|
4203
4213
|
for ( var i = 0; i < provider.tableColumns.length ; i++ ) {
|
4204
4214
|
var column = provider.tableColumns[i];
|
4205
4215
|
var isColumnIndex = provider.tableIndex.some ( indexPart => indexPart.columnNumber == column.number );
|
4206
|
-
// prevent not-accessible index entries from being added as columns in the row
|
4207
|
-
if ( ! isColumnIndex || column.maxAccess
|
4216
|
+
// prevent not-accessible and accessible-for-notify index entries from being added as columns in the row
|
4217
|
+
if ( ! isColumnIndex || ! (column.maxAccess === MaxAccess['not-accessible'] || column.maxAccess === MaxAccess['accessible-for-notify']) ) {
|
4208
4218
|
instanceAddress = providerNode.address.concat (column.number).concat (instance);
|
4209
4219
|
this.addNodesForAddress (instanceAddress);
|
4210
4220
|
instanceNode = this.lookup (instanceAddress);
|