Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OID prefix starting with dot #4

Closed
simPod opened this issue Feb 6, 2019 · 2 comments
Closed

OID prefix starting with dot #4

simPod opened this issue Feb 6, 2019 · 2 comments

Comments

@simPod
Copy link

simPod commented Feb 6, 2019

Sometimes SNMP oids gets prefixed with .1.3.6.1 and sometimes with 1.3.6.1

However https://github.com/FreeDSx/ASN1/blob/master/src/FreeDSx/Asn1/Encoder/BerEncoder.php#L725 can work only with the latter so calling it fails on Warning: A non-numeric value encountered

@ChadSikorra
Copy link
Contributor

Thanks for reporting this. I decided to solve it in the SNMP library instead: FreeDSx/SNMP@ea41da7. As that convention seems specific to SNMP for whatever reason.

I'm not sure where the leading dot format started. I have never seen it mentioned in any official SNMP RFCs or the ASN.1 docs (X.680, X.690). I could probably add more checks to the validity of a string OID format, but I try not to do too much of that in the encoder since it would start to impact performance on large sets of data.

@simPod
Copy link
Author

simPod commented Feb 7, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants