From 11f2e85adeb4b91dcd8cedebec569f01fa6261bf Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Wed, 13 Sep 2023 03:06:54 +0300 Subject: [PATCH] import net-snmp-5.9.1-11.el9_2 --- SOURCES/net-snmp-5.9-sendmsg-error-code.patch | 31 +++++++++++++++++++ SPECS/net-snmp.spec | 16 +++++++--- 2 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 SOURCES/net-snmp-5.9-sendmsg-error-code.patch diff --git a/SOURCES/net-snmp-5.9-sendmsg-error-code.patch b/SOURCES/net-snmp-5.9-sendmsg-error-code.patch new file mode 100644 index 0000000..6709cef --- /dev/null +++ b/SOURCES/net-snmp-5.9-sendmsg-error-code.patch @@ -0,0 +1,31 @@ +From 298c8103db80b292791616af4fd497342a71867f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Josef=20=C5=98=C3=ADdk=C3=BD?= +Date: Wed, 24 May 2023 10:49:41 +0200 +Subject: [PATCH] libsnmp, UDP transport: Fix sendmsg() error code handling + +This change has been made because of Linux kernel commit "ipv4: Return +-ENETUNREACH if we can't create route but saddr is valid" +(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=595e0651d029) + +Fixes: https://github.com/net-snmp/net-snmp/issues/564 +Fixes: https://github.com/net-snmp/net-snmp/pull/576 + +[ bvanassche: edited commit message ] +--- + snmplib/transports/snmpUDPBaseDomain.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/snmplib/transports/snmpUDPBaseDomain.c b/snmplib/transports/snmpUDPBaseDomain.c +index ca8f9a5554..cd6b15e2ad 100644 +--- a/snmplib/transports/snmpUDPBaseDomain.c ++++ b/snmplib/transports/snmpUDPBaseDomain.c +@@ -315,7 +315,7 @@ int netsnmp_udpbase_sendto_unix(int fd, const struct in_addr *srcip, + sizeof(struct sockaddr)); + else + rc = sendmsg(fd, &m, MSG_DONTWAIT); +- if (rc >= 0 || errno != EINVAL) ++ if (rc >= 0 || (errno != EINVAL && errno != ENETUNREACH)) + return rc; + + /* + diff --git a/SPECS/net-snmp.spec b/SPECS/net-snmp.spec index d7b1491..62d844e 100644 --- a/SPECS/net-snmp.spec +++ b/SPECS/net-snmp.spec @@ -10,7 +10,7 @@ Summary: A collection of SNMP protocol tools and libraries Name: net-snmp Version: 5.9.1 -Release: 9%{?dist} +Release: 11%{?dist} Epoch: 1 License: BSD @@ -54,6 +54,7 @@ Patch24: net-snmp-5.9-twice-IP-parsing.patch 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 # Modern RPM API means at least EL6 Patch101: net-snmp-5.8-modern-rpm-api.patch @@ -188,9 +189,9 @@ binaries and applications. %package -n python3-net-snmp %{?python_provide:%python_provide python3-net-snmp} # Remove before F30 -Provides: %{name}-python = %{version}-%{release} -Provides: %{name}-python%{?_isa} = %{version}-%{release} -Obsoletes: %{name}-python < %{version}-%{release} +Provides: %{name}-python = %{epoch}:%{version}-%{release} +Provides: %{name}-python%{?_isa} = %{epoch}:%{version}-%{release} +Obsoletes: %{name}-python < %{epoch}:%{version}-%{release} Summary: The Python 'netsnmp' module for the Net-SNMP Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} @@ -233,6 +234,7 @@ cp %{SOURCE10} . %patch25 -p1 -b .openssl-3-0 %patch26 -p1 %patch27 -p1 -b .ipv6-disable-leak +%patch28 -p1 -b .sendmsg-error-code %patch101 -p1 -b .modern-rpm-api %patch102 -p1 @@ -502,6 +504,12 @@ LD_LIBRARY_PATH=%{buildroot}/%{_libdir} make test %{_libdir}/libnetsnmptrapd*.so.%{soname}* %changelog +* Thu Aug 03 2023 Josef Ridky - 1:5.9.1-11 +- fix python3 missing epoch + +* Wed Aug 02 2023 Josef Ridky - 1:5.9.1-10 +- fix sendmsg error code for new kernel (#2210892) + * Wed Feb 15 2023 Josef Ridky - 1:5.9.1-9 - fix CVE-2022-44792 and CVE-2022-44793 (#2141902) and (#2141906) - fix memory leak when ipv6 disable set to 1 (#2151540)