Resolves: RHEL-13960 - fix message severity issue
This commit is contained in:
parent
0329225c1c
commit
e9a592daa5
48
net-snmp-5.9-message-severity.patch
Normal file
48
net-snmp-5.9-message-severity.patch
Normal file
@ -0,0 +1,48 @@
|
||||
From 7330e3e3e08d9baff23332e764f9a53561939fff Mon Sep 17 00:00:00 2001
|
||||
From: Bart Van Assche <bvanassche@acm.org>
|
||||
Date: Thu, 2 Sep 2021 21:06:54 -0700
|
||||
Subject: [PATCH] libsnmp: Log "Truncating integer value >32 bits" once
|
||||
|
||||
Log this message once instead of every time sysUpTime and/or
|
||||
hrSystemUptime are accessed after snmpd is running for more than 497 days.
|
||||
|
||||
Fixes: https://github.com/net-snmp/net-snmp/issues/144
|
||||
---
|
||||
snmplib/snmp_client.c | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/snmplib/snmp_client.c b/snmplib/snmp_client.c
|
||||
index 0f539c63fe..b00670d973 100644
|
||||
--- a/snmplib/snmp_client.c
|
||||
+++ b/snmplib/snmp_client.c
|
||||
@@ -853,7 +853,8 @@ snmp_set_var_value(netsnmp_variable_list * vars,
|
||||
= (const u_long *) value;
|
||||
*(vars->val.integer) = *val_ulong;
|
||||
if (*(vars->val.integer) > 0xffffffff) {
|
||||
- snmp_log(LOG_ERR,"truncating integer value > 32 bits\n");
|
||||
+ NETSNMP_LOGONCE((LOG_INFO,
|
||||
+ "truncating integer value > 32 bits\n"));
|
||||
*(vars->val.integer) &= 0xffffffff;
|
||||
}
|
||||
}
|
||||
@@ -865,7 +866,8 @@ snmp_set_var_value(netsnmp_variable_list * vars,
|
||||
= (const unsigned long long *) value;
|
||||
*(vars->val.integer) = (long) *val_ullong;
|
||||
if (*(vars->val.integer) > 0xffffffff) {
|
||||
- snmp_log(LOG_ERR,"truncating integer value > 32 bits\n");
|
||||
+ NETSNMP_LOGONCE((LOG_INFO,
|
||||
+ "truncating integer value > 32 bits\n"));
|
||||
*(vars->val.integer) &= 0xffffffff;
|
||||
}
|
||||
}
|
||||
@@ -877,7 +879,8 @@ snmp_set_var_value(netsnmp_variable_list * vars,
|
||||
= (const uintmax_t *) value;
|
||||
*(vars->val.integer) = (long) *val_uintmax_t;
|
||||
if (*(vars->val.integer) > 0xffffffff) {
|
||||
- snmp_log(LOG_ERR,"truncating integer value > 32 bits\n");
|
||||
+ NETSNMP_LOGONCE((LOG_INFO,
|
||||
+ "truncating integer value > 32 bits\n"));
|
||||
*(vars->val.integer) &= 0xffffffff;
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
Summary: A collection of SNMP protocol tools and libraries
|
||||
Name: net-snmp
|
||||
Version: 5.9.1
|
||||
Release: 11%{?dist}
|
||||
Release: 12%{?dist}
|
||||
Epoch: 1
|
||||
|
||||
License: BSD
|
||||
@ -55,6 +55,7 @@ Patch25: net-snmp-5.9-openssl-3.0.patch
|
||||
Patch26: net-snmp-5.9-CVE-2022-44792-44793.patch
|
||||
Patch27: net-snmp-5.9-ipv6-disable-leak.patch
|
||||
Patch28: net-snmp-5.9-sendmsg-error-code.patch
|
||||
Patch29: net-snmp-5.9-message-severity.patch
|
||||
|
||||
# Modern RPM API means at least EL6
|
||||
Patch101: net-snmp-5.8-modern-rpm-api.patch
|
||||
@ -235,6 +236,7 @@ cp %{SOURCE10} .
|
||||
%patch26 -p1
|
||||
%patch27 -p1 -b .ipv6-disable-leak
|
||||
%patch28 -p1 -b .sendmsg-error-code
|
||||
%patch29 -p1 -b .message-severity
|
||||
|
||||
%patch101 -p1 -b .modern-rpm-api
|
||||
%patch102 -p1
|
||||
@ -504,6 +506,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{_libdir} make test
|
||||
%{_libdir}/libnetsnmptrapd*.so.%{soname}*
|
||||
|
||||
%changelog
|
||||
* Thu Oct 19 2023 Josef Ridky <jridky@redhat.com> - 1:5.9.1-12
|
||||
- fix message severity issue (RHEL-13960)
|
||||
|
||||
* Thu Aug 03 2023 Josef Ridky <jridky@redhat.com> - 1:5.9.1-11
|
||||
- fix python3 missing epoch
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user