Re: [PATCH 1/1] fix snmp in total set vars

6 views
Skip to first unread message

Jan Kiszka

unread,
Feb 27, 2025, 8:55:30 AM2/27/25
to scmi, isar-...@googlegroups.com, stefa...@siemens.com, christi...@siemens.com, michae...@siemens.com, simon....@siemens.com, cedric.h...@siemens.com, adriaan...@siemens.com, felix.mo...@siemens.com, ub...@ilbers.de
On 27.02.25 11:19, scmi wrote:
> Fixes an issue which inhibits snmpInTotalSetVars to increment correctly
> ---
> agent/snmp_agent.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/agent/snmp_agent.c b/agent/snmp_agent.c
> index 9913a968e1..c728059ac8 100644
> --- a/agent/snmp_agent.c
> +++ b/agent/snmp_agent.c
> @@ -1908,6 +1908,8 @@ netsnmp_wrap_up_request(netsnmp_agent_session *asp, int status)
> }
>
> if (asp->pdu) {
> + int command = asp->pdu->command;
> +
> /*
> * If we've got an error status, then this needs to be
> * passed back up to the higher levels....
> @@ -2030,7 +2032,7 @@ netsnmp_wrap_up_request(netsnmp_agent_session *asp, int status)
> if (status == SNMP_ERR_NOERROR)
> snmp_increment_statistic_by(
> #ifndef NETSNMP_NO_WRITE_SUPPORT
> - (asp->pdu->command == SNMP_MSG_SET ?
> + (command == SNMP_MSG_SET ?
> STAT_SNMPINTOTALSETVARS : STAT_SNMPINTOTALREQVARS),
> #else
> STAT_SNMPINTOTALREQVARS,

Wrong list? :)

Jan

--
Siemens AG, Foundational Technologies
Linux Expert Center
Reply all
Reply to author
Forward
0 new messages