From 0ccb7f321eed7ab77d2bb97eb8cfef45abc957fa Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sep 27 2022 14:06:41 +0000 Subject: import libnl3-3.7.0-1.el9 --- diff --git a/.gitignore b/.gitignore index 9a9b9bf..5c7efaa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/libnl-3.5.0.tar.gz -SOURCES/libnl-doc-3.5.0.tar.gz +SOURCES/libnl-3.7.0.tar.gz +SOURCES/libnl-doc-3.7.0.tar.gz diff --git a/.libnl3.metadata b/.libnl3.metadata index f62ef88..48cb0e2 100644 --- a/.libnl3.metadata +++ b/.libnl3.metadata @@ -1,2 +1,2 @@ -54c476a3103add175a6a055fcf45c0a29d2c0948 SOURCES/libnl-3.5.0.tar.gz -e0857124974053ee7be34fbda6812b57961f0ae8 SOURCES/libnl-doc-3.5.0.tar.gz +34c0fa84005b1522175d42165f6e885f75b1b8e3 SOURCES/libnl-3.7.0.tar.gz +ed296fd3341d3f90912a01bb77d539c19ca666f3 SOURCES/libnl-doc-3.7.0.tar.gz diff --git a/SOURCES/0001-coverity-fixes-rh1938776.patch b/SOURCES/0001-coverity-fixes-rh1938776.patch deleted file mode 100644 index 5e0daee..0000000 --- a/SOURCES/0001-coverity-fixes-rh1938776.patch +++ /dev/null @@ -1,168 +0,0 @@ -From 5ab3bf7122eafe3bf06b147f8d936a976fe810ba Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Tue, 25 May 2021 14:18:10 +0200 -Subject: [PATCH 1/4] route/cls: fix cgroup's clone() function - -The destination object doesn't have to be allocated because it's -passed as _dst argument. Also, the function doesn't have to copy plain -fields. - -(cherry picked from commit 30552e849c38972dd11fafbb8085924987b002cc) ---- - lib/route/cls/cgroup.c | 15 +++++---------- - 1 file changed, 5 insertions(+), 10 deletions(-) - -diff --git a/lib/route/cls/cgroup.c b/lib/route/cls/cgroup.c -index b145261825f2..2461d22fd595 100644 ---- a/lib/route/cls/cgroup.c -+++ b/lib/route/cls/cgroup.c -@@ -36,17 +36,12 @@ static struct nla_policy cgroup_policy[TCA_CGROUP_MAX+1] = { - - static int cgroup_clone(void *_dst, void *_src) - { -- struct rtnl_cgroup *dst = NULL, *src = _src; -+ struct rtnl_cgroup *dst = _dst, *src = _src; - -- dst = calloc(1, sizeof(*dst)); -- if (!dst) -- return -NLE_NOMEM; -- -- dst->cg_mask = src->cg_mask; -- dst->cg_ematch = rtnl_ematch_tree_clone(src->cg_ematch); -- if (!dst) { -- free(dst); -- return -NLE_NOMEM; -+ if (src->cg_ematch) { -+ dst->cg_ematch = rtnl_ematch_tree_clone(src->cg_ematch); -+ if (!dst->cg_ematch) -+ return -NLE_NOMEM; - } - - return 0; --- -2.31.1 - - -From 6a118c6b3cf8aa8638e057a282acbf06f09c41a8 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Tue, 25 May 2021 14:33:21 +0200 -Subject: [PATCH 2/4] route/link: fix copy-paste error in geneve.c - -(cherry picked from commit aa092d1e729acb8b4aa5a3aaf2f228f46bafec5b) ---- - lib/route/link/geneve.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/route/link/geneve.c b/lib/route/link/geneve.c -index 7232b07f8452..9de1e8f1158f 100644 ---- a/lib/route/link/geneve.c -+++ b/lib/route/link/geneve.c -@@ -240,7 +240,7 @@ static void geneve_dump_details(struct rtnl_link *link, struct nl_dump_params *p - - if (geneve->mask & GENEVE_ATTR_UDP_ZERO_CSUM6_RX) { - nl_dump(p, " udp-zero-csum6-rx "); -- if (geneve->udp_zero_csum6_tx) -+ if (geneve->udp_zero_csum6_rx) - nl_dump_line(p, "enabled (%#x)\n", geneve->udp_zero_csum6_rx); - else - nl_dump_line(p, "disabled\n"); --- -2.31.1 - - -From ed42caf2abdfa52fcb35416710bdcfd8189d8878 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Tue, 25 May 2021 14:42:29 +0200 -Subject: [PATCH 3/4] route/qdisc: fix memory leak in netem.c - -'data' was leaked when returning -NLE_INVAL. Fix this by using the -cleanup attribute. - -(cherry picked from commit d1a151eb6fe603365d93526796b3fa7e64e1c0fd) ---- - lib/route/qdisc/netem.c | 10 ++++------ - 1 file changed, 4 insertions(+), 6 deletions(-) - -diff --git a/lib/route/qdisc/netem.c b/lib/route/qdisc/netem.c -index 17dee3b7efa4..20df8fd413b2 100644 ---- a/lib/route/qdisc/netem.c -+++ b/lib/route/qdisc/netem.c -@@ -26,6 +26,8 @@ - #include - #include - -+#include "netlink-private/utils.h" -+ - /** @cond SKIP */ - #define SCH_NETEM_ATTR_LATENCY 0x0001 - #define SCH_NETEM_ATTR_LIMIT 0x0002 -@@ -911,10 +913,10 @@ int rtnl_netem_set_delay_distribution(struct rtnl_qdisc *qdisc, const char *dist - int n = 0; - size_t i; - size_t len = 2048; -- char *line; -+ _nl_auto_free char *line = NULL; - char name[NAME_MAX]; - char dist_suffix[] = ".dist"; -- int16_t *data; -+ _nl_auto_free int16_t *data = NULL; - char *test_suffix; - - /* Check several locations for the dist file */ -@@ -955,7 +957,6 @@ int rtnl_netem_set_delay_distribution(struct rtnl_qdisc *qdisc, const char *dist - if (endp == p) break; - - if (n >= MAXDIST) { -- free(line); - fclose(f); - return -NLE_INVAL; - } -@@ -963,11 +964,8 @@ int rtnl_netem_set_delay_distribution(struct rtnl_qdisc *qdisc, const char *dist - } - } - -- free(line); - fclose(f); -- - i = rtnl_netem_set_delay_distribution_data(qdisc, data, n); -- free(data); - return i; - } - --- -2.31.1 - - -From f60433f575beb927b69d6a857a0345d1a3206311 Mon Sep 17 00:00:00 2001 -From: Beniamino Galvani -Date: Wed, 16 Jun 2021 11:56:25 +0200 -Subject: [PATCH 4/4] route/qdisc: handle error of calloc() - -(cherry picked from commit 26f342d09947d5884014ec4a0553c094e41c60bc) ---- - lib/route/qdisc/netem.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/lib/route/qdisc/netem.c b/lib/route/qdisc/netem.c -index 20df8fd413b2..ceb2ad9871d2 100644 ---- a/lib/route/qdisc/netem.c -+++ b/lib/route/qdisc/netem.c -@@ -942,9 +942,12 @@ int rtnl_netem_set_delay_distribution(struct rtnl_qdisc *qdisc, const char *dist - if (f == NULL) - return -nl_syserr2nlerr(errno); - -- data = (int16_t *) calloc (MAXDIST, sizeof(int16_t)); -- -- line = (char *) calloc (sizeof(char), len + 1); -+ data = (int16_t *) calloc(MAXDIST, sizeof(int16_t)); -+ line = (char *) calloc(sizeof(char), len + 1); -+ if (!data || !line) { -+ fclose(f); -+ return -NLE_NOMEM; -+ } - - while (getline(&line, &len, f) != -1) { - char *p, *endp; --- -2.31.1 - diff --git a/SPECS/libnl3.spec b/SPECS/libnl3.spec index ab55b6e..ce24aa8 100644 --- a/SPECS/libnl3.spec +++ b/SPECS/libnl3.spec @@ -1,6 +1,6 @@ Name: libnl3 -Version: 3.5.0 -Release: 10%{?dist} +Version: 3.7.0 +Release: 1%{?dist} Summary: Convenience library for kernel netlink sockets License: LGPLv2 URL: http://www.infradead.org/~tgr/libnl/ @@ -19,7 +19,6 @@ Source: http://www.infradead.org/~tgr/libnl/files/libnl-%{fullversion}.tar.gz Source1: http://www.infradead.org/~tgr/libnl/files/libnl-doc-%{fullversion}.tar.gz #Patch1: some.patch -Patch0001: 0001-coverity-fixes-rh1938776.patch BuildRequires: autoconf @@ -82,7 +81,7 @@ tar -xzf %SOURCE1 %build autoreconf -vif -%configure --disable-static +%configure make %{?_smp_mflags} %if %{with python3} @@ -119,6 +118,7 @@ popd %files %doc COPYING %exclude %{_libdir}/libnl-cli*.so.* +%exclude %{_libdir}/libnl*-3.a %{_libdir}/libnl-*.so.* %config(noreplace) %{_sysconfdir}/* @@ -153,6 +153,15 @@ popd %endif %changelog +* Wed Jul 6 2022 Thomas Haller - 3.7.0-1 +- Update to 3.7.0 release (rh #2075841) + +* Tue May 3 2022 Thomas Haller - 3.6.0-2 +- route: fix crash parsing multihop route (rh #2081279) + +* Thu Apr 21 2022 Thomas Haller - 3.6.0-1 +- Update to 3.6.0 release (rh #2075841) + * Mon Aug 09 2021 Mohan Boddu - 3.5.0-10 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688