summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/selinux-hook-handling-to-enumerate-nexthop.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd/selinux-hook-handling-to-enumerate-nexthop.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/selinux-hook-handling-to-enumerate-nexthop.patch46
1 files changed, 0 insertions, 46 deletions
diff --git a/meta/recipes-core/systemd/systemd/selinux-hook-handling-to-enumerate-nexthop.patch b/meta/recipes-core/systemd/systemd/selinux-hook-handling-to-enumerate-nexthop.patch
deleted file mode 100644
index b1c92ed713..0000000000
--- a/meta/recipes-core/systemd/systemd/selinux-hook-handling-to-enumerate-nexthop.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From 92b555aaabf710e0a672a7244e8c0e3963075133 Mon Sep 17 00:00:00 2001
2From: Purushottam choudhary <purushottam.choudhary@kpit.com>
3Date: Wed, 28 Oct 2020 22:11:49 +0530
4Subject: [PATCH] network: selinux hook handling to enumerate nexthop
5
6When selinux is enabled, the call of
7manager_rtnl_enumerate_nexthop() fails.
8
9This fix is to facilitate selinux hook handling for enumerating
10nexthop.
11
12In manager_rtnl_enumerate_nexthop() there is a check
13if "Not supported" is returned by the send_netlink() call.
14
15This check expects that -EOPNOTSUPP is returned,
16the selinux hook seems to return -EINVAL instead.
17
18This happens in kernel older than 5.3
19(more specificallytorvalds/linux@65ee00a) as it does not support
20nexthop handling through netlink.
21
22And if SELinux is enforced in the order kernel, callingRTM_GETNEXTHOP
23returns -EINVAL.
24
25Thus adding a call in the manager_rtnl_enumerate_nexthop for the
26extra return -EINVAL.
27
28Upstream-Status: Backport
29https://github.com/systemd/systemd/commit/92b555aaabf710e0a672a7244e8c0e3963075133
30---
31 src/network/networkd-manager.c | 3 ++-
32 1 file changed, 2 insertions(+), 1 deletion(-)
33
34diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
35index a6c1a39..2a9be85 100644
36--- a/src/network/networkd-manager.c
37+++ b/src/network/networkd-manager.c
38@@ -2121,7 +2121,7 @@ int manager_rtnl_enumerate_nexthop(Manager *m) {
39
40 r = sd_netlink_call(m->rtnl, req, 0, &reply);
41 if (r < 0) {
42- if (r == -EOPNOTSUPP) {
43+ if (r == -EOPNOTSUPP || r == -EINVAL) {
44 log_debug("Nexthop are not supported by the kernel. Ignoring.");
45 return 0;
46 }