prevent segfault in af_request_type
This commit is contained in:
parent
85cb15fe9a
commit
9b8250a873
27
backport-fix-bridge-info-parsing.patch
Normal file
27
backport-fix-bridge-info-parsing.patch
Normal 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
|
||||||
|
|
||||||
28
backport-prevent-segfault-in-af_request_type.patch
Normal file
28
backport-prevent-segfault-in-af_request_type.patch
Normal 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
|
||||||
|
|
||||||
12
libnl3.spec
12
libnl3.spec
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user