markabrahams / node-asn1-ber

Generate and parse ASN.1 BER objects
7 stars 8 forks source link

Add write support for short OIDs #20

Closed markabrahams closed 4 years ago

markabrahams commented 4 years ago

Hi @stephenwvickers - hope this finds you well!

The node-net-snmp agent needs to "reflect" received OIDs of any length, including those "short" OIDs (shorter than 4 parts to the address).

The current node-net-snmp solution is for the SNMP agent to somewhat incorrectly rewrite any reflected OIDs less than 4 parts to "1.3.6.1", just so that node-asn1-ber will write it without errors. However, this violates RFC 3416, Section 4.2.1: "All fields of the Response-PDU have the same values as the corresponding fields of the received request..."

A better solution is for the node-asn1-ber writer to enable writeOID to support OIDs shorter than length 4, hence this (1-character!) pull request.

stephenwvickers commented 4 years ago

Hi @markabrahams

I am well, hope you are well.

Do you fancy taking over this repo too?

I literally don't have anytime right now :(

Steve

markabrahams commented 4 years ago

OK Steve - that probably makes some sense. I'll message / email you to progress.