-
Notifications
You must be signed in to change notification settings - Fork 340
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
ip address with length 0 #53
Comments
@benjamin-thomas What does a net-snmp tool such as snmpwalk or snmpget show for that OID? |
Here is the relevant snmpwalk output (the problematic OID is
Here is the output of my program with debug output (the retry messages are my own, the rest is the library's debug output)
I had to scan the When starting to scan from My guess is snmpwalk crashed because of bad data. I'm not sure how to interpret the raw data though. |
From memory I added the IP parsing code... never expecting that an IP address could be of length zero according to ASN.1/BER. The real world always has different ideas :-) We should make our library as resilient at possible and I think we should code around this to support "the real world". I can see two options: Option 1) Option 2)
I'd welcome some thoughts/votes? |
+1 for Option 1) |
I've run into devices returning a 0 length ip addresses, mainly Lexmark printers (for example Lexmark CX310dn)
This line returns the following error in my program:
For the moment, I've been ignoring/skipping this error in my own program, but was wondering if there would be any drawbacks or objections to initialize an "empty" ip address (for example
0.0.0.0
ornil
) and not return an error instead?Any thoughts?
The text was updated successfully, but these errors were encountered: