!39 update some patches from community

From: @chengyechun 
Reviewed-by: @robertxw 
Signed-off-by: @robertxw
This commit is contained in:
openeuler-ci-bot 2023-08-14 08:51:14 +00:00 committed by Gitee
commit 6d6d75f3f4
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 66 additions and 1 deletions

View File

@ -0,0 +1,27 @@
From 143cee1d381753c3ff01d51b39d7717d5c59bd2 Mon Sep 17 00:00:00 2001
From: Thomas Haller <thom311@redhat.com>
Date: Tue, 25 Jul 2023 02:09:46 AM GMT+0800
Subject: [PATCH] fix bridge info parsing
Conflict:NA
Reference:https://github.com/thom311/libnl/commit/143cee1d381753c3ff01d51b39d7717d5c59bd2
---
lib/route/link/bridge.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/route/link/bridge.c b/lib/route/link/bridge.c
index bd04253..919828f 100644
--- a/lib/route/link/bridge.c
+++ b/lib/route/link/bridge.c
@@ -189,6 +189,7 @@ static int bridge_parse_af_full(struct rtnl_link *link, struct nlattr *attr_full
if (nla_type(attr) == IFLA_BRIDGE_MODE) {
bd->b_hwmode = nla_get_u16(attr);
bd->ce_mask |= BRIDGE_ATTR_HWMODE;
+ continue;
} else if (nla_type(attr) != IFLA_BRIDGE_VLAN_INFO)
continue;
--
2.23.0

View File

@ -0,0 +1,28 @@
From 6519a9173f900b364f014a2321a17aa6bf652e6d Mon Sep 17 00:00:00 2001
From: Thomas Haller <thom311@redhat.com>
Date: Tue, 25 Jul 2023 01:38:44 AM GMT+0800
Subject: [PATCH] prevent segfault in af_request_type
Conflict:NA
Reference:https://github.com/thom311/libnl/commit/6519a9173f900b364f014a2321a17aa6bf652e6d
---
lib/route/link.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/route/link.c b/lib/route/link.c
index df8ea5b..e3f657b 100644
--- a/lib/route/link.c
+++ b/lib/route/link.c
@@ -115,7 +115,7 @@ static int af_request_type(int af_type, struct rtnl_link *changes)
struct rtnl_link_af_ops *ops;
ops = rtnl_link_af_ops_lookup(af_type);
- if (ops && ops->ao_override_rtm(changes))
+ if (ops && ops->ao_override_rtm && ops->ao_override_rtm(changes))
return RTM_SETLINK;
return RTM_NEWLINK;
--
2.23.0

View File

@ -1,11 +1,14 @@
Name: libnl3 Name: libnl3
Version: 3.7.0 Version: 3.7.0
Release: 1 Release: 2
Summary: Providing APIs to netlink protocol based Linux kernel interfaces Summary: Providing APIs to netlink protocol based Linux kernel interfaces
License: LGPLv2 License: LGPLv2
URL: http://www.infradead.org/~tgr/libnl/ URL: http://www.infradead.org/~tgr/libnl/
Source: https://github.com/thom311/libnl/releases/download/libnl3_7_0/libnl-3.7.0.tar.gz Source: https://github.com/thom311/libnl/releases/download/libnl3_7_0/libnl-3.7.0.tar.gz
Patch6000: backport-prevent-segfault-in-af_request_type.patch
Patch6001: backport-fix-bridge-info-parsing.patch
BuildRequires: flex bison libtool autoconf automake swig BuildRequires: flex bison libtool autoconf automake swig
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
@ -89,6 +92,13 @@ cd python
%{python3_sitearch}/netlink-*.egg-info %{python3_sitearch}/netlink-*.egg-info
%changelog %changelog
* Mon Aug 14 2023 chengyechun <chengyechun1@huawei.com> - 3.7.0-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:prevent segfault in af_request_type
fix bridge info parsing
* Wed Nov 9 2022 chengyechun <chengyechun1@huawei.com> - 3.7.0-1 * Wed Nov 9 2022 chengyechun <chengyechun1@huawei.com> - 3.7.0-1
- Type:enhancement - Type:enhancement
- ID:NA - ID:NA