|
From: Dave C <dav...@gm...> - 2018-03-27 23:41:49
|
I have an AgentX sub agent and needed to add a delayed response to a GET request whilst I perform some background processing. This is all 5.7.3. Following this example. http://www.net-snmp.org/dev/agent/delayed__instance_8c-example.html In my normal GET handler I am setting requests->delegated = 1; Then setting up the delay (snmp_alarm_register) passing it the delegated cashe. Finally returning SNMP_ERR_NOERROR; back to snmpd On the remote side I am calling snmpget to fetch the OID in question. I can see from a pcap that my agent responds ( I presume with some kind of deferral notification) But snmpget immediately sends the same GET request. So my handler is getting hammered even though I told it to delegate? I'm getting about 16 such duplicate GET's before the timer I setup runs out (2 seconds). It seems I've created something of an infinite loop here, but I'm not able to distinguish 'duplicate' packets from the real ones in my handler? Any ideas on where to look? Thanks Dave |