net-snmp 3.10.3 → 3.10.4

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.
Files changed (3) hide show
  1. package/README.md +4 -0
  2. package/lib/mib.js +9 -2
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -3355,6 +3355,10 @@ Example programs are included under the module's `example` directory.
3355
3355
 
3356
3356
  * Add MIB parsing support for final member of OID value list containing identifier/descriptor pair
3357
3357
 
3358
+ ## Version 3.10.4 - 22/03/2024
3359
+
3360
+ * Add MIB parsing support for middle member of OID value list containing identifier only
3361
+
3358
3362
  # License
3359
3363
 
3360
3364
  Copyright (c) 2020 Mark Abrahams <mark@abrahams.co.nz>
package/lib/mib.js CHANGED
@@ -765,8 +765,15 @@ var MIB = function (dir) {
765
765
  let midOD = [parent];
766
766
  for (let entry of members) {
767
767
  let match = entry.match(/(.*)\((.+)\)$/);
768
- midID.push(match[2]);
769
- midOD.push(match[1]);
768
+ // cater for unannotated middle entries
769
+ // e.g. { enterprises 2699 1 1 }
770
+ if ( ! match ) {
771
+ midID.push(entry);
772
+ midOD.push(entry);
773
+ } else {
774
+ midID.push(match[2]);
775
+ midOD.push(match[1]);
776
+ }
770
777
  }
771
778
  midID.push(oid);
772
779
  if ( ID != '' ) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "net-snmp",
3
- "version": "3.10.3",
3
+ "version": "3.10.4",
4
4
  "description": "JavaScript implementation of the Simple Network Management Protocol (SNMP)",
5
5
  "main": "index.js",
6
6
  "directories": {