-
Notifications
You must be signed in to change notification settings - Fork 0
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
Upgrade to gosnmp mainline with our bespoke changes #2
base: master
Are you sure you want to change the base?
Conversation
* Add SnmpEncodePacket & SnmpDecodePacket * Cleanup * Return errors to caller vs log * Relocate functions and add comments * Time for more ☕, fix the comment to match the function
* Store MsgMaxSize, support SNMPv3 SnmpDecodePacket * Export MsgMaxSize * Add SetMsgID/SetRequestID, validate Encode/Decode
Error handling is required. Otherwise, a nil trap will be passed into function unmarshalPayload, which triggers a panic.
* Removed bit-lopping * revamped to adhere to BER
* Rerunning of mockgen off of interface.go * Remove self-import
mockgen -source=interface.go -package gosnmp > gosnmp_mock.go
MrSpock's fix - issue 179
RFC 3430 specifies the transport of SNMP over TCP. It can be used to support more efficient bulk transfers. This is supported in net-snmp and the snmpd from OpenBSD for example. This commit adds the field Transport to the GoSNMP struct that allows the selection of UDP or TCP as transport layer. Connect() uses the specified method to query the server. The interface of the library remains the same. As the connection can be closed at any time by the server, we need to handle an EOF from the connection gracefully. This change also adds an example to walk using TCP. It was tested against the snmpd from OpenBSD.
…some Huawei devices)" This reverts commit 8f085b5.
@initialed85 I have now updated the PR so that we don't have to do any resets. I did a clean merge involving reverting some of our commits |
I've been having a bit of a look in more detail at the commits we've made in our fork- here's a starting point for a catalogue:
From a brief squiz most of those have had an alternative implemented in upstream (and so for better or worse, I guess we should use that)- however for sure the "Support multiple params for SNMP traps" functionality doesn't have a counterpart. This one is useful and I suspect not well tested in CI, it speaks to having more than one community string (or a mixture of SNMPv2 and SNMPv3) configured for an SNMP trap listener- so if we get rid of that behaviour we risk finding out the hard way that we needed it (in prod). And as this isn't Python, it's not as easy as just slamming some code into a running environment to fix it (we'd need to copy built libraries deep into a Virtualenv inside the backend container). So it might give the perception of lost velocity, but I think we need to take an approach here of the following:
It's really the only way we can have any confidence I think. Stream of consciousness:
EDIT: I think https://github.com/ftpsolutions/ims-mono/pull/2237 will cover us for test cases (except for the manual AR503 one) |
This is taking the latest mainline gosnmp then porting our bespoke changes on top. It's a lot of incoming changes. You can see my specific changes by looking at the latest commits.
https://app.clickup.com/t/1t208he