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).
Does this only happen when you configure with both
--enable-read-onlyand--disable-set-support? I think the right fix for this case is to change the code inhandle_snmp_packet()to be more likesince it's clear that the
NETSNMP_NO_WRITE_SUPPORTcase pretends thatSNMP_MSG_SETis an invalid command, not a known one that we want to reply to with not-writable.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
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
I've committed a patch to the V5-7-patches and master git branches. Could you please test?