update some patches from community
This commit is contained in:
parent
aa1c13946e
commit
7ad99dac61
@ -0,0 +1,52 @@
|
||||
From cdedd335b6cbe7fff492b32ef00d928d8d389570 Mon Sep 17 00:00:00 2001
|
||||
From: Andrea Claudi <aclaudi@redhat.com>
|
||||
Date: Tue, 21 Sep 2021 11:33:24 +0200
|
||||
Subject: [PATCH] lib: bpf_legacy: fix bpffs mount when /sys/fs/bpf exists
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
bpf selftests using iproute2 fails with:
|
||||
|
||||
$ ip link set dev veth0 xdp object ../bpf/xdp_dummy.o section xdp_dummy
|
||||
Continuing without mounted eBPF fs. Too old kernel?
|
||||
mkdir (null)/globals failed: No such file or directory
|
||||
Unable to load program
|
||||
|
||||
This happens when the /sys/fs/bpf directory exists. In this case, mkdir
|
||||
in bpf_mnt_check_target() fails with errno == EEXIST, and the function
|
||||
returns -1. Thus bpf_get_work_dir() does not call bpf_mnt_fs() and the
|
||||
bpffs is not mounted.
|
||||
|
||||
Fix this in bpf_mnt_check_target(), returning 0 when the mountpoint
|
||||
exists.
|
||||
|
||||
Fixes: d4fcdbbec9df ("lib/bpf: Fix and simplify bpf_mnt_check_target()")
|
||||
Reported-by: Mingyu Shi <mshi@redhat.com>
|
||||
Reported-by: Jiri Benc <jbenc@redhat.com>
|
||||
Suggested-by: Jiri Benc <jbenc@redhat.com>
|
||||
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
|
||||
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
|
||||
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
||||
|
||||
Conflicts: lib/bpf.c
|
||||
---
|
||||
lib/bpf.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/lib/bpf.c b/lib/bpf.c
|
||||
index 0062e83..014314b 100644
|
||||
--- a/lib/bpf.c
|
||||
+++ b/lib/bpf.c
|
||||
@@ -525,6 +525,8 @@ static int bpf_mnt_check_target(const char *target)
|
||||
if (ret) {
|
||||
ret = mkdir(target, S_IRWXU);
|
||||
if (ret) {
|
||||
+ if (errno == EEXIST)
|
||||
+ return 0;
|
||||
fprintf(stderr, "mkdir %s failed: %s\n", target,
|
||||
strerror(errno));
|
||||
return ret;
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
36
bugfix-iproute2-tc-f_flower-fix-port-range-parsing.patch
Normal file
36
bugfix-iproute2-tc-f_flower-fix-port-range-parsing.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From 9ce12b62181cfed8ddac855efb858f88ac036ce1 Mon Sep 17 00:00:00 2001
|
||||
From: Puneet Sharma <pusharma@akamai.com>
|
||||
Date: Mon, 20 Sep 2021 11:00:01 -0400
|
||||
Subject: [PATCH] tc/f_flower: fix port range parsing
|
||||
|
||||
Provided port range in tc rule are parsed incorrectly.
|
||||
Even though range is passed as min-max. It throws an error.
|
||||
|
||||
$ tc filter add dev eth0 ingress handle 100 priority 10000 protocol ipv4 flower ip_proto tcp dst_port 10368-61000 action pass
|
||||
max value should be greater than min value
|
||||
Illegal "dst_port"
|
||||
|
||||
Fixes: 8930840e678b ("tc: flower: Classify packets based port ranges")
|
||||
Signed-off-by: Puneet Sharma <pusharma@akamai.com>
|
||||
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
||||
Conflict: NA
|
||||
---
|
||||
tc/f_flower.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tc/f_flower.c b/tc/f_flower.c
|
||||
index 8f248db..e7f28c6 100644
|
||||
--- a/tc/f_flower.c
|
||||
+++ b/tc/f_flower.c
|
||||
@@ -717,7 +717,7 @@ static int flower_parse_port(char *str, __u8 ip_proto,
|
||||
if (min && max) {
|
||||
__be16 min_port_type, max_port_type;
|
||||
|
||||
- if (max <= min) {
|
||||
+ if (ntohs(max) <= ntohs(min)) {
|
||||
fprintf(stderr, "max value should be greater than min value\n");
|
||||
return -1;
|
||||
}
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
11
iproute.spec
11
iproute.spec
@ -1,6 +1,6 @@
|
||||
Name: iproute
|
||||
Version: 5.5.0
|
||||
Release: 6
|
||||
Release: 7
|
||||
Summary: Linux network configuration utilities
|
||||
License: GPLv2+ and Public Domain
|
||||
URL: https://kernel.org/pub/linux/utils/net/iproute2/
|
||||
@ -21,6 +21,8 @@ Patch9002: feature-iproute-limit-operation-ip-netns-del.patch
|
||||
Patch9003: feature-iproute-add-support-for-ipvlan-l2e-mode.patch
|
||||
Patch9004: feature-peer_notify_delay-renamed-to-peer_notif_delay.patch
|
||||
Patch9005: bugfix-iproute-support-assume-default-route.patch
|
||||
Patch9006: bugfix-iproute2-lib-bpf-fix-bpffs-mount-when-sys-fs-bpf-exist.patch
|
||||
Patch9007: bugfix-iproute2-tc-f_flower-fix-port-range-parsing.patch
|
||||
|
||||
BuildRequires: gcc bison elfutils-libelf-devel flex iptables-devel libcap-devel
|
||||
BuildRequires: libmnl-devel libselinux-devel pkgconfig git
|
||||
@ -89,6 +91,13 @@ install -m 0644 lib/libnetlink.a %{buildroot}%{_libdir}/libnetlink.a
|
||||
%{_mandir}/*
|
||||
|
||||
%changelog
|
||||
* Fri Oct 29 2021 chengycehun <chengycehun1@huawei.com> - 5.5.0-7
|
||||
- Type:bugfix
|
||||
- Id:NA
|
||||
- SUG:NA
|
||||
- DESC:lib/bpf:fix bpffs mount when /sys/fs/bpf exists
|
||||
tc/f_flower:fix port range parsing
|
||||
|
||||
* Sat Jun 26 2021 jiangheng <jiangheng12@huawei.com> - 5.5.0-6
|
||||
- Type:requirement
|
||||
- Id:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user