net-snmp 3.5.1 → 3.5.5
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 +16 -4
- package/package.json +1 -1
package/README.md
CHANGED
@@ -3138,6 +3138,22 @@ Example programs are included under the module's `example` directory.
|
|
3138
3138
|
|
3139
3139
|
* Fix MIB parsing of sized integers without whitespace
|
3140
3140
|
|
3141
|
+
## Version 3.5.2 - 02/03/2021
|
3142
|
+
|
3143
|
+
* Fix MIB table index handling of Buffer type
|
3144
|
+
|
3145
|
+
## Version 3.5.3 - 22/08/2021
|
3146
|
+
|
3147
|
+
* Fix error with empty varbind array in walk
|
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
|
+
|
3141
3157
|
# License
|
3142
3158
|
|
3143
3159
|
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,12 @@ function walkCb (req, error, varbinds) {
|
|
2641
2642
|
}
|
2642
2643
|
}
|
2643
2644
|
|
2644
|
-
if (
|
2645
|
+
if ( ! varbinds.length ) {
|
2646
|
+
req.doneCb(null);
|
2647
|
+
return;
|
2648
|
+
}
|
2649
|
+
|
2650
|
+
if (this.version == Version2c || this.version == Version3) {
|
2645
2651
|
for (var i = varbinds[0].length; i > 0; i--) {
|
2646
2652
|
if (varbinds[0][i - 1].type == ObjectType.EndOfMibView) {
|
2647
2653
|
varbinds[0].pop ();
|
@@ -4081,7 +4087,13 @@ Mib.prototype.getOidAddressFromValue = function (value, indexPart) {
|
|
4081
4087
|
oidComponents = value.split (".");
|
4082
4088
|
break;
|
4083
4089
|
case ObjectType.OctetString:
|
4084
|
-
|
4090
|
+
if ( value instanceof Buffer ) {
|
4091
|
+
// Buffer
|
4092
|
+
oidComponents = Array.prototype.slice.call (value);
|
4093
|
+
} else {
|
4094
|
+
// string
|
4095
|
+
oidComponents = [...value].map (c => c.charCodeAt());
|
4096
|
+
}
|
4085
4097
|
break;
|
4086
4098
|
case ObjectType.IpAddress:
|
4087
4099
|
return value.split (".");
|
@@ -4192,8 +4204,8 @@ Mib.prototype.addTableRow = function (table, row) {
|
|
4192
4204
|
for ( var i = 0; i < provider.tableColumns.length ; i++ ) {
|
4193
4205
|
var column = provider.tableColumns[i];
|
4194
4206
|
var isColumnIndex = provider.tableIndex.some ( indexPart => indexPart.columnNumber == column.number );
|
4195
|
-
// prevent not-accessible index entries from being added as columns in the row
|
4196
|
-
if ( ! isColumnIndex || column.maxAccess
|
4207
|
+
// prevent not-accessible and accessible-for-notify index entries from being added as columns in the row
|
4208
|
+
if ( ! isColumnIndex || ! (column.maxAccess === MaxAccess['not-accessible'] || column.maxAccess === MaxAccess['accessible-for-notify']) ) {
|
4197
4209
|
instanceAddress = providerNode.address.concat (column.number).concat (instance);
|
4198
4210
|
this.addNodesForAddress (instanceAddress);
|
4199
4211
|
instanceNode = this.lookup (instanceAddress);
|