I've created a unit test for my SNMPv3 subagent, and I seem to be running into issues. When it work's, it work's great. However, every few times I run the unit-test the master disconnects the subagent session. Also, I would definitely prefer not to use SNMP, but it is a requirement.
I am running Fedora 28 with net-snmp 5.7.3
Here is a description of the unit test:
I see the following behaviors:
After looking through net-snmp source the best I can tell is that sometimes packets are malformed for some reason, but I don't think that cover's all of the different issues I am having.
I also have a C# SNMP Client that never runs into any of these issues, so I can't see how it would be server related.
For anyone who might run across this:
The solution is simply to run the subagent and client in different processes. I was running the subagent and client in the same googletest process, and it caused a lot of conflicts. I guess I should have realized it wouldn't be safe to do so with a library like net-snmp.