After a reboot of a router the new engineboots counter value is sent in a report pdu to net-snmp when using SNMP-v3. Net-snmp handles the protocol with the router correctly in this situation. But net-snmp erroneously sends an empty callback to the application in this case.
This callback contains an undef data list. The Perl API docs say that the meaning of an undef data list is timeout. Hence our application clears this net-snmp-session. Later on successful received data cannot be assigned by following callbacks and is lost, because the corresponding session has been cleared before.
In our opinion there should be no callback triggered by net-snmp if a report pdu is received. There is no need to inform the application about that.
A patch is attached for snmp_api.c. It prevents a callback if the PDU is SNMP_MSG_REPORT and SNMPERR_NOT_IN_TIME_WINDOW.
We have developed the patch for net-snmp version 5.6.1 (snmp_api.c) and tested it successfully.
We assume it is suitable for the current version too, because there is no difference in snmp_api.c in this context.
We would be glad, if this patch would be approved and included in further releases.
attachment contains the file snmplib/snmp_api.c after patching it
attachment contains the original file snmplib/snmp_api.c
I'm also interested in seeing this applied and offer my help... compare http://sourceforge.net/p/net-snmp/mailman/message/32268599/