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

Only one of the two correct connection parameters can be correctly connected. #395

Open
haodayitiaoyu666 opened this issue Feb 10, 2022 · 4 comments

Comments

@haodayitiaoyu666
Copy link

haodayitiaoyu666 commented Feb 10, 2022

We have two correct SNMPv3 protocol parameters A and B.
Invoke the snmp.Get interface.
Use the A to connect first,the correct result is obtained. Then use the B to connect second,the result is:
result &{Version:3 MsgFlags:1 SecurityModel:3 PDUType:168 RequestID:0 Error:NoError ErrorIndex:0 NonRepeaters:0 MaxRepetitions:0 Variables:[{Name:.1.3.6.1.6.3.15.1.1.6.0 Type:Counter32 Value:12}] SnmpTrap:{Variables:[] IsInform:false Enterprise: AgentAddress: GenericTrap:0 SpecificTrap:0 Timestamp:0}}
Use the B to connect first,the correct result is obtained. Then use the A to connect second,the result is the same

this is snmpV3 parameter
image

Below is the tcp dump. Any ideas why this might be happening?
image

@haodayitiaoyu666
Copy link
Author

haodayitiaoyu666 commented Feb 10, 2022

I find that only when PrivacyProtocol is AES-256 or AES-192 the error has occurred

@TimRots
Copy link
Member

TimRots commented Feb 15, 2022

Hi @haodayitiaoyu666. Can you share what version of gosnmp you are on and, if possible, some code to reproduce the issue?
Thanks in advance.

@haodayitiaoyu666
Copy link
Author

haodayitiaoyu666 commented Feb 16, 2022

v1.34.0 has this problem.
I modified the following code and fixed the problem.
image
I wonder why an empty string is passed in here. @TimRots

@TimRots
Copy link
Member

TimRots commented Feb 17, 2022

I wonder why an empty string is passed in here. @TimRots

Thank you. That doesn't seem right indeed. Will have a look at it.

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

Successfully merging a pull request may close this issue.

2 participants