Resolves: RHEL-101078 - fix inverted usage of -n arg in snmptrapd

Signed-off-by: Josef Ridky <jridky@redhat.com>
This commit is contained in:
Josef Ridky 2025-10-22 08:40:30 +02:00
parent 2cb576b643
commit 5c3ab6409a
2 changed files with 18 additions and 1 deletions

View File

@ -0,0 +1,12 @@
diff -urNp a/apps/snmptrapd_log.c b/apps/snmptrapd_log.c
--- a/apps/snmptrapd_log.c 2025-09-03 15:15:12.510914175 +0200
+++ b/apps/snmptrapd_log.c 2025-09-03 15:15:40.804731480 +0200
@@ -590,7 +590,7 @@ realloc_handle_time_fmt(u_char ** buf, s
static
void convert_agent_addr(struct in_addr agent_addr, char *name, size_t size)
{
- const int numeric = !netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
+ const int numeric = netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
NETSNMP_DS_APP_NUMERIC_IP);
struct sockaddr_in sin;

View File

@ -10,7 +10,7 @@
Summary: A collection of SNMP protocol tools and libraries
Name: net-snmp
Version: 5.9.1
Release: 17%{?dist}
Release: 18%{?dist}
Epoch: 1
License: BSD
@ -60,6 +60,7 @@ Patch30: net-snmp-5.9-rpmdb.patch
Patch31: net-snmp-5.9-CVE-2022-24805-24810.patch
Patch32: net-snmp-5.9.4-kernel-6.7.patch
Patch33: net-snmp-5.9-deleted-iface.patch
Patch34: net-snmp-5.9.4-revert-n-snmptrapd-log.patch
# Modern RPM API means at least EL6
Patch101: net-snmp-5.8-modern-rpm-api.patch
@ -245,6 +246,7 @@ cp %{SOURCE10} .
%patch31 -p1 -b .CVE-2022-24805-24810
%patch32 -p1 -b .kernel-6.7-fix
%patch33 -p1 -b .iface
%patch34 -p1 -b .revert-n-snmptrapd-log
%patch101 -p1 -b .modern-rpm-api
%patch102 -p1
@ -514,6 +516,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{_libdir} make test
%{_libdir}/libnetsnmptrapd*.so.%{soname}*
%changelog
* Wed Oct 22 2025 Josef Ridky <jridky@redhat.com> - 1:5.9.1-18
- fix inverted usage of -n in snmptrapd (RHEL-101078)
* Tue Jul 16 2024 Josef Ridky <jridky@redhat.com> - 1:5.9.1-17
- fix segfault with error on subcontainer (RHEL-46033)