Menu

#1256 don't trigger an API callback when report pdu is received

backport-needed
open
nobody
2
2014-05-02
2013-06-03
martin987
No

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.

1 Attachments

Discussion

  • martin987

    martin987 - 2013-06-03

    attachment contains the file snmplib/snmp_api.c after patching it

     
  • martin987

    martin987 - 2013-06-03

    attachment contains the original file snmplib/snmp_api.c

     
  • Michael Bunk

    Michael Bunk - 2014-05-02

    I'm also interested in seeing this applied and offer my help... compare http://sourceforge.net/p/net-snmp/mailman/message/32268599/

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.