This builds on top of the previous two diffs. Easiest way to test is to add the following line to vm.conf in combination with snmpd(8): agentx context foo
This results in: [fd:6 sess:4009008336 ctx:foo]: region .1.3.6.1.2.1.236: opening [fd:6 sess:4009008336 ctx:foo]: region .1.3.6.1.2.1.236: Unsupported context If you then remove the "context foo" part and run vmctl reload vmd should properly register: [fd:6 sess:4009008336 ctx:<default>]: region .1.3.6.1.2.1.236: opening [fd:6 sess:4009008336 ctx:<default>]: region .1.3.6.1.2.1.236: open OK? martijn@ Index: vm_agentx.c =================================================================== RCS file: /cvs/src/usr.sbin/vmd/vm_agentx.c,v retrieving revision 1.1 diff -u -p -r1.1 vm_agentx.c --- vm_agentx.c 13 Sep 2022 10:28:19 -0000 1.1 +++ vm_agentx.c 11 Oct 2022 18:52:45 -0000 @@ -321,6 +321,7 @@ vm_agentx_configure(struct vmd_agentx *e changed = 1; } + agentx_retry(conn->agentx); if (!changed) return;