Menu

#2846 Second compile error with net-snmp-5.8.pre2/agent/snmp_agent.c

linux
pending
nobody
5
2018-04-11
2018-04-09
Mark E Rusk
No

a different compile error with NO_WRITE_SUPPORT set (see error3.txt). The code is handling incoming packets in a section marked by #ifdef NETSNMP_DISABLE_SET_SUPPORT (line 2215). However, SNMP_MSG_SET is defined in net-snmp-5.8.pre2/include/net-snmp/library/snmp.h in a section marked by #ifndef NETSNMP_NO_WRITE_SUPPORT. This should not be there since even though the agent is not going to support WRITE/SET's, it still need to handle SNMP SET commands as an error condition (see error3.patch).

2 Attachments

Related

Bugs: #2846

Discussion

  • Bill Fenner

    Bill Fenner - 2018-04-10

    Does this only happen when you configure with both --enable-read-only and --disable-set-support? I think the right fix for this case is to change the code in handle_snmp_packet() to be more like

    #if defined(NETSNMP_DISABLE_SET_SUPPORT) && !defined(NETSNMP_NO_WRITE_SUPPORT)
        if (pdu->command == SNMP_MSG_SET) {
    ...
        }
    #endif
    

    since it's clear that the NETSNMP_NO_WRITE_SUPPORT case pretends that SNMP_MSG_SET is an invalid command, not a known one that we want to reply to with not-writable.

     
  • Bill Fenner

    Bill Fenner - 2018-04-11
    • status: open --> pending
     
    • Mark  E Rusk

      Mark E Rusk - 2018-04-12

      Tested. Compiles and runs correctly.

      From: Bill Fenner [mailto:fenner@users.sourceforge.net]
      Sent: Wednesday, April 11, 2018 10:09 AM
      To: [net-snmp:bugs] 2846@bugs.net-snmp.p.re.sourceforge.net
      Subject: [net-snmp:bugs] #2846 Second compile error with net-snmp-5.8.pre2/agent/snmp_agent.c

      • status: open --> pending
      • Comment:

      I've committed a patch to the V5-7-patches and master git branches. Could you please test?


      [bugs:#2846]https://sourceforge.net/p/net-snmp/bugs/2846/ Second compile error with net-snmp-5.8.pre2/agent/snmp_agent.c

      Status: pending
      Group: linux
      Labels: NO_WRITE_SUPPORT 5.8.pre2
      Created: Mon Apr 09, 2018 09:44 PM UTC by Mark E Rusk
      Last Updated: Tue Apr 10, 2018 08:47 PM UTC
      Owner: nobody
      Attachments:

      a different compile error with NO_WRITE_SUPPORT set (see error3.txt). The code is handling incoming packets in a section marked by #ifdef NETSNMP_DISABLE_SET_SUPPORT (line 2215). However, SNMP_MSG_SET is defined in net-snmp-5.8.pre2/include/net-snmp/library/snmp.h in a section marked by #ifndef NETSNMP_NO_WRITE_SUPPORT. This should not be there since even though the agent is not going to support WRITE/SET's, it still need to handle SNMP SET commands as an error condition (see error3.patch).


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/net-snmp/bugs/2846/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #2846

  • Bill Fenner

    Bill Fenner - 2018-04-11

    I've committed a patch to the V5-7-patches and master git branches. Could you please test?

     

Log in to post a comment.

MongoDB Logo MongoDB