Add two fixes to 4.10.0 release from upstream

This commit is contained in:
Phil Sutter 2017-03-17 22:51:24 +01:00
parent d0d65fdc0c
commit 63284ad5e9
4 changed files with 111 additions and 10 deletions

View File

@ -1,13 +1,26 @@
diff -Nurp iproute2-4.5.0.orig/man/man8/cbq.8 iproute2-4.5.0/man/man8/cbq.8
--- iproute2-4.5.0.orig/man/man8/cbq.8 1970-01-01 01:00:00.000000000 +0100
+++ iproute2-4.5.0/man/man8/cbq.8 2016-03-18 13:17:00.673773197 +0100
From 2332a21bd43ca69ad38a30109881867b9c5c2ea0 Mon Sep 17 00:00:00 2001
From: Phil Sutter <psutter@redhat.com>
Date: Fri, 17 Mar 2017 22:47:27 +0100
Subject: [PATCH] Documentation fixes
---
man/man8/cbq.8 | 1 +
man/man8/ss.8 | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
create mode 100644 man/man8/cbq.8
diff --git a/man/man8/cbq.8 b/man/man8/cbq.8
new file mode 100644
index 00000000..bef35201
--- /dev/null
+++ b/man/man8/cbq.8
@@ -0,0 +1 @@
+.so man8/tc-cbq.8
\ No newline at end of file
diff -Nurp iproute2-4.5.0.orig/man/man8/ss.8 iproute2-4.5.0/man/man8/ss.8
--- iproute2-4.5.0.orig/man/man8/ss.8 2016-03-18 13:16:45.046773197 +0100
+++ iproute2-4.5.0/man/man8/ss.8 2016-03-18 13:17:05.910773197 +0100
@@ -136,7 +136,7 @@ Read filter information from FILE.
diff --git a/man/man8/ss.8 b/man/man8/ss.8
index 4ef11523..3898bdbd 100644
--- a/man/man8/ss.8
+++ b/man/man8/ss.8
@@ -142,7 +142,7 @@ Read filter information from FILE.
Each line of FILE is interpreted like single command line option. If FILE is - stdin is used.
.TP
.B FILTER := [ state STATE-FILTER ] [ EXPRESSION ]
@ -16,7 +29,7 @@ diff -Nurp iproute2-4.5.0.orig/man/man8/ss.8 iproute2-4.5.0/man/man8/ss.8
.SH STATE-FILTER
@@ -191,7 +191,7 @@ Find all local processes connected to X
@@ -197,7 +197,7 @@ Find all local processes connected to X server.
List all the tcp sockets in state FIN-WAIT-1 for our apache to network 193.233.7/24 and look at their timers.
.SH SEE ALSO
.BR ip (8),
@ -25,3 +38,6 @@ diff -Nurp iproute2-4.5.0.orig/man/man8/ss.8 iproute2-4.5.0/man/man8/ss.8
.br
.BR RFC " 793 "
- https://tools.ietf.org/rfc/rfc793.txt (TCP states)
--
2.11.0

View File

@ -0,0 +1,38 @@
From 2706951bc0dad80596f172e9197452163bc9e067 Mon Sep 17 00:00:00 2001
From: Simon Horman <simon.horman@netronome.com>
Date: Wed, 8 Feb 2017 13:04:31 +0100
Subject: [PATCH] tc: flower: use correct type when calling
flower_icmp_attr_type
Use enum flower_icmp_field rather than bool as type of third parameter
when calling flower_icmp_attr_type.
Fixes: eb3b5696f163 ("tc: flower: support matching on ICMP type and code")
Signed-off-by: Simon Horman <simon.horman@netronome.com>
(cherry picked from commit 81f6e5a7279eaab826ba8b291b98fb2e89df0572)
---
tc/f_flower.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tc/f_flower.c b/tc/f_flower.c
index 145a8566..75a3fbbc 100644
--- a/tc/f_flower.c
+++ b/tc/f_flower.c
@@ -752,10 +752,12 @@ static int flower_print_opt(struct filter_util *qu, FILE *f,
if (nl_type >= 0)
flower_print_port(f, "src_port", tb[nl_type]);
- nl_type = flower_icmp_attr_type(eth_type, ip_proto, false);
+ nl_type = flower_icmp_attr_type(eth_type, ip_proto,
+ FLOWER_ICMP_FIELD_TYPE);
if (nl_type >= 0)
flower_print_icmp(f, "icmp_type", tb[nl_type]);
- nl_type = flower_icmp_attr_type(eth_type, ip_proto, true);
+ nl_type = flower_icmp_attr_type(eth_type, ip_proto,
+ FLOWER_ICMP_FIELD_CODE);
if (nl_type >= 0)
flower_print_icmp(f, "icmp_code", tb[nl_type]);
--
2.11.0

View File

@ -0,0 +1,38 @@
From 305197a2378ffb581f1eca3ec804f76690be7b5a Mon Sep 17 00:00:00 2001
From: Daniel Borkmann <daniel@iogearbox.net>
Date: Mon, 6 Mar 2017 13:06:00 +0100
Subject: [PATCH] bpf: test for valid type in bpf_get_work_dir
Jan-Erik reported an assertion in bpf_prog_to_subdir() failed where
type was BPF_PROG_TYPE_UNSPEC, which is only used in bpf_init_env()
to auto-mount and cache the bpf fs mount point.
Therefore, make sure when bpf_init_env() is called multiple times
(f.e. eBPF classifier with eBPF action attached) and bpf_mnt_cached
is set already that the type is also valid. In bpf_init_env(), we're
only interested in the mount point and not a type-specific subdir.
Fixes: e42256699cac ("bpf: make tc's bpf loader generic and move into lib")
Reported-by: Jan-Erik Rediger <janerik@rediger.net>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
(cherry picked from commit 51361a9f1cfca81259c68515cb24fbaace03136a)
---
lib/bpf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/bpf.c b/lib/bpf.c
index 64e199b3..fef9cfcd 100644
--- a/lib/bpf.c
+++ b/lib/bpf.c
@@ -596,7 +596,7 @@ static const char *bpf_get_work_dir(enum bpf_prog_type type)
if (bpf_mnt_cached) {
const char *out = mnt;
- if (out) {
+ if (out && type) {
snprintf(bpf_tmp, sizeof(bpf_tmp), "%s%s/",
out, bpf_prog_to_subdir(type));
out = bpf_tmp;
--
2.11.0

View File

@ -2,7 +2,7 @@
Summary: Advanced IP routing and network device configuration tools
Name: iproute
Version: 4.10.0
Release: 1%{?dist}
Release: 2%{?dist}
Group: Applications/System
URL: http://kernel.org/pub/linux/utils/net/%{name}2/
Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.xz
@ -16,6 +16,10 @@ Source2: avpkt
# - We ship ss.ps instead of ss.html.
Patch1: 0001-Documentation-fixes.patch
# upstream fixes for commits in 4.10.0 release
Patch2: 0002-tc-flower-use-correct-type-when-calling-flower_icmp_.patch
Patch3: 0003-bpf-test-for-valid-type-in-bpf_get_work_dir.patch
License: GPLv2+ and Public Domain
BuildRequires: bison
BuildRequires: elfutils-libelf-devel
@ -78,6 +82,8 @@ The libnetlink static library.
%prep
%setup -q -n %{name}2-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
export CFLAGS="%{optflags}"
@ -162,6 +168,9 @@ rm -rf '%{buildroot}%{_docdir}'
%{_includedir}/iproute2/bpf_elf.h
%changelog
* Fri Mar 17 2017 Phil Sutter <psutter@redhat.com> - 4.10.0-2
- Add two fixes to 4.10.0 release from upstream.
* Tue Mar 14 2017 Phil Sutter <psutter@redhat.com> - 4.10.0-1
- Ship new header iproute2/bpf_elf.h
- Document content of remaining docs fixup patch in spec file