From 81a513ba3c2293be27e88a81d7d3f6bf61379552 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 23 May 2017 13:31:58 +0200 Subject: [PATCH 1/6] Rebase package on top of iproute2-4.11.0 --- iproute.spec | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/iproute.spec b/iproute.spec index 868260b..33c3d17 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,8 +1,8 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 4.10.0 -Release: 3%{?dist} +Version: 4.11.0 +Release: 1%{?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,10 +16,6 @@ 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 @@ -58,6 +54,7 @@ Group: Applications/System License: GPLv2+ Obsoletes: %{name} < 4.5.0-3 Requires: %{name}%{?_isa} = %{version}-%{release} +Provides: tc %description tc The Traffic Control utility manages queueing disciplines, their classes and @@ -86,8 +83,6 @@ The libnetlink static library. %prep %setup -q -n %{name}2-%{version} %patch1 -p1 -%patch2 -p1 -%patch3 -p1 %build export CFLAGS="%{optflags}" @@ -176,6 +171,10 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Tue May 23 2017 Phil Sutter - 4.11.0-1 +- Add virtual capability to tc subpackage so it's easier found +- New version 4.11.0 + * Thu May 11 2017 Karsten Hopp - 4.10.0-3 - don't build docs for module builds to limit dependencies From 74656075ed5ad4ed7270b8aeb6afa2a4ef914fc7 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 23 May 2017 14:36:29 +0200 Subject: [PATCH 2/6] Update gitignore and sources files for new package version --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 52ced98..581d394 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /iproute2-4.8.0.tar.xz /iproute2-4.9.0.tar.xz /iproute2-4.10.0.tar.xz +/iproute2-4.11.0.tar.xz diff --git a/sources b/sources index 72be43e..045e47d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-4.10.0.tar.xz) = e54477e167455e7ef5da4adc168d63eaa96091b63dc987fffe918cbb005eceed18a62283ca99ee2512dc0e960f47ae21b39ffbe399c1612fd9cea147c34c581b +SHA512 (iproute2-4.11.0.tar.xz) = e6cc3dbe2779670a752ab346c1a432b496033448d1645aa0161b3f7b683b3f9939ab09db12199b794cc64dff257faaf0d151046feea9031a6139176e08b4f4fa From 62d79125de33e17275ffbf3f2cc42d61ba355a98 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 21 Jul 2017 17:04:46 +0200 Subject: [PATCH 3/6] Rebase package on top of iproute2-4.12.0 --- .gitignore | 1 + iproute.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 581d394..7065a5b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /iproute2-4.9.0.tar.xz /iproute2-4.10.0.tar.xz /iproute2-4.11.0.tar.xz +/iproute2-4.12.0.tar.xz diff --git a/iproute.spec b/iproute.spec index 33c3d17..44f78d9 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,7 +1,7 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 4.11.0 +Version: 4.12.0 Release: 1%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ @@ -171,6 +171,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Fri Jul 21 2017 Phil Sutter - 4.12.0-1 +- New version 4.12.0 + * Tue May 23 2017 Phil Sutter - 4.11.0-1 - Add virtual capability to tc subpackage so it's easier found - New version 4.11.0 diff --git a/sources b/sources index 045e47d..60df61a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-4.11.0.tar.xz) = e6cc3dbe2779670a752ab346c1a432b496033448d1645aa0161b3f7b683b3f9939ab09db12199b794cc64dff257faaf0d151046feea9031a6139176e08b4f4fa +SHA512 (iproute2-4.12.0.tar.xz) = 275147f71e7c4698654f0d6d0981ab42f6f108066508c15cfcd5d9e0d3aaf8d33291968d9f06cb03f5494d801cfabf8d53308aaf56fc4fa92c52b137e970a3b0 From 9cac8d8147c8ae9daf7bc47f3d3da016bc8b3fc4 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 19 Sep 2017 19:56:50 +0200 Subject: [PATCH 4/6] Rebase package on top of iproute2-4.13.0 --- .gitignore | 1 + iproute.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7065a5b..832eb2c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /iproute2-4.10.0.tar.xz /iproute2-4.11.0.tar.xz /iproute2-4.12.0.tar.xz +/iproute2-4.13.0.tar.xz diff --git a/iproute.spec b/iproute.spec index 44f78d9..38aa57e 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,7 +1,7 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 4.12.0 +Version: 4.13.0 Release: 1%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ @@ -171,6 +171,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Tue Sep 19 2017 Phil Sutter - 4.13.0-1 +- New version 4.13.0 + * Fri Jul 21 2017 Phil Sutter - 4.12.0-1 - New version 4.12.0 diff --git a/sources b/sources index 60df61a..ba1a9cc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-4.12.0.tar.xz) = 275147f71e7c4698654f0d6d0981ab42f6f108066508c15cfcd5d9e0d3aaf8d33291968d9f06cb03f5494d801cfabf8d53308aaf56fc4fa92c52b137e970a3b0 +SHA512 (iproute2-4.13.0.tar.xz) = f96d2839aec1f439bfac504c8e3881c063dacbf4c67b15f0e3da9882d2fa013cba33c23602de3eab624e0eecbb911a13967d60bddcdf097f47a580a5a77b5e3a From 7257b9efe49e7769dc53e2610bbd0e8b1c756081 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 15 Nov 2017 14:56:50 +0100 Subject: [PATCH 5/6] Rebase package on top of iproute2-4.14.1 - Add upstream suggested backports. - Make use of %%autosetup macro. --- .gitignore | 1 + 0001-Documentation-fixes.patch | 12 +- ...ion-cookie-print-out-of-the-stats-if.patch | 50 ++++ ...move-action-cookie-len-from-printout.patch | 31 +++ ...re6-Detect-invalid-encaplimit-values.patch | 31 +++ ...x-inconsistency-in-example-descripti.patch | 34 +++ ...ll-NEXT_ARG_FWD-in-__parse_action_co.patch | 224 ++++++++++++++++++ 0007-ss-remove-duplicate-assignment.patch | 33 +++ ...mpletion-add-missing-classid-keyword.patch | 31 +++ iproute.spec | 39 +-- sources | 2 +- 11 files changed, 466 insertions(+), 22 deletions(-) create mode 100644 0002-tc-move-action-cookie-print-out-of-the-stats-if.patch create mode 100644 0003-tc-remove-action-cookie-len-from-printout.patch create mode 100644 0004-link_gre6-Detect-invalid-encaplimit-values.patch create mode 100644 0005-man-tc-csum.8-Fix-inconsistency-in-example-descripti.patch create mode 100644 0006-tc-util-Don-t-call-NEXT_ARG_FWD-in-__parse_action_co.patch create mode 100644 0007-ss-remove-duplicate-assignment.patch create mode 100644 0008-tc-bash-completion-add-missing-classid-keyword.patch diff --git a/.gitignore b/.gitignore index 832eb2c..320a98c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /iproute2-4.11.0.tar.xz /iproute2-4.12.0.tar.xz /iproute2-4.13.0.tar.xz +/iproute2-4.14.1.tar.xz diff --git a/0001-Documentation-fixes.patch b/0001-Documentation-fixes.patch index 3269037..c3a9185 100644 --- a/0001-Documentation-fixes.patch +++ b/0001-Documentation-fixes.patch @@ -1,4 +1,4 @@ -From 2332a21bd43ca69ad38a30109881867b9c5c2ea0 Mon Sep 17 00:00:00 2001 +From 34f2e1640c6d6a051116478011eb58f995a24076 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 17 Mar 2017 22:47:27 +0100 Subject: [PATCH] Documentation fixes @@ -11,16 +11,16 @@ Subject: [PATCH] Documentation fixes diff --git a/man/man8/cbq.8 b/man/man8/cbq.8 new file mode 100644 -index 00000000..bef35201 +index 0000000000000..bef35201f4eab --- /dev/null +++ b/man/man8/cbq.8 @@ -0,0 +1 @@ +.so man8/tc-cbq.8 diff --git a/man/man8/ss.8 b/man/man8/ss.8 -index 4ef11523..3898bdbd 100644 +index 8565ccb4814aa..5a85bee6a4b7a 100644 --- a/man/man8/ss.8 +++ b/man/man8/ss.8 -@@ -142,7 +142,7 @@ Read filter information from FILE. +@@ -319,7 +319,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 ] @@ -29,7 +29,7 @@ index 4ef11523..3898bdbd 100644 .SH STATE-FILTER -@@ -197,7 +197,7 @@ Find all local processes connected to X server. +@@ -374,7 +374,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), @@ -39,5 +39,5 @@ index 4ef11523..3898bdbd 100644 .BR RFC " 793 " - https://tools.ietf.org/rfc/rfc793.txt (TCP states) -- -2.11.0 +2.13.1 diff --git a/0002-tc-move-action-cookie-print-out-of-the-stats-if.patch b/0002-tc-move-action-cookie-print-out-of-the-stats-if.patch new file mode 100644 index 0000000..28c78a3 --- /dev/null +++ b/0002-tc-move-action-cookie-print-out-of-the-stats-if.patch @@ -0,0 +1,50 @@ +From 06ed8e1fc690683fb1226a23548c81b7032fe7fe Mon Sep 17 00:00:00 2001 +From: Jiri Pirko +Date: Sat, 25 Nov 2017 11:07:56 +0100 +Subject: [PATCH] tc: move action cookie print out of the stats if + +Cookie print was made dependent on show_stats for no good reason. Fix +this bu pushing cookie print ot of the stats if. + +Fixes: fd8b3d2c1b9b ("actions: Add support for user cookies") +Signed-off-by: Jiri Pirko +(cherry picked from commit abff45b8026e24dedfe05376d8fedc1a8fe43402) +--- + tc/m_action.c | 17 ++++++++--------- + 1 file changed, 8 insertions(+), 9 deletions(-) + +diff --git a/tc/m_action.c b/tc/m_action.c +index 402228bbf833d..704708f70aaac 100644 +--- a/tc/m_action.c ++++ b/tc/m_action.c +@@ -302,19 +302,18 @@ static int tc_print_one_action(FILE *f, struct rtattr *arg) + return err; + + if (show_stats && tb[TCA_ACT_STATS]) { +- + fprintf(f, "\tAction statistics:\n"); + print_tcstats2_attr(f, tb[TCA_ACT_STATS], "\t", NULL); +- if (tb[TCA_ACT_COOKIE]) { +- int strsz = RTA_PAYLOAD(tb[TCA_ACT_COOKIE]); +- char b1[strsz * 2 + 1]; +- +- fprintf(f, "\n\tcookie len %d %s ", strsz, +- hexstring_n2a(RTA_DATA(tb[TCA_ACT_COOKIE]), +- strsz, b1, sizeof(b1))); +- } + fprintf(f, "\n"); + } ++ if (tb[TCA_ACT_COOKIE]) { ++ int strsz = RTA_PAYLOAD(tb[TCA_ACT_COOKIE]); ++ char b1[strsz * 2 + 1]; ++ ++ fprintf(f, "\tcookie len %d %s\n", strsz, ++ hexstring_n2a(RTA_DATA(tb[TCA_ACT_COOKIE]), ++ strsz, b1, sizeof(b1))); ++ } + + return 0; + } +-- +2.13.1 + diff --git a/0003-tc-remove-action-cookie-len-from-printout.patch b/0003-tc-remove-action-cookie-len-from-printout.patch new file mode 100644 index 0000000..7ef2fcb --- /dev/null +++ b/0003-tc-remove-action-cookie-len-from-printout.patch @@ -0,0 +1,31 @@ +From 903d2bee8c6f156790758f7e9131490b70475ecd Mon Sep 17 00:00:00 2001 +From: Jiri Pirko +Date: Sat, 25 Nov 2017 11:07:57 +0100 +Subject: [PATCH] tc: remove action cookie len from printout + +Make the output same as input and avoid printout of unnecessary len. + +Suggested-by: Stephen Hemminger +Fixes: fd8b3d2c1b9b ("actions: Add support for user cookies") +Signed-off-by: Jiri Pirko +(cherry picked from commit 81051c60c24ad083cfcb46271e6450675763c722) +--- + tc/m_action.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tc/m_action.c b/tc/m_action.c +index 704708f70aaac..951ca973f4806 100644 +--- a/tc/m_action.c ++++ b/tc/m_action.c +@@ -310,7 +310,7 @@ static int tc_print_one_action(FILE *f, struct rtattr *arg) + int strsz = RTA_PAYLOAD(tb[TCA_ACT_COOKIE]); + char b1[strsz * 2 + 1]; + +- fprintf(f, "\tcookie len %d %s\n", strsz, ++ fprintf(f, "\tcookie %s\n", + hexstring_n2a(RTA_DATA(tb[TCA_ACT_COOKIE]), + strsz, b1, sizeof(b1))); + } +-- +2.13.1 + diff --git a/0004-link_gre6-Detect-invalid-encaplimit-values.patch b/0004-link_gre6-Detect-invalid-encaplimit-values.patch new file mode 100644 index 0000000..af51d99 --- /dev/null +++ b/0004-link_gre6-Detect-invalid-encaplimit-values.patch @@ -0,0 +1,31 @@ +From 6ecadd9b426bb05c31ec92c01e5352ac05d4e676 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Tue, 28 Nov 2017 16:49:58 +0100 +Subject: [PATCH] link_gre6: Detect invalid encaplimit values + +Looks like a typo: get_u8() returns 0 on success and -1 on error, so the +error checking here was ineffective. + +Fixes: a11b7b71a6eba ("link_gre6: really support encaplimit option") +Signed-off-by: Phil Sutter +(cherry picked from commit 56708ae7c9535859223c5b68097b35bf0fae677c) +--- + ip/link_gre6.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ip/link_gre6.c b/ip/link_gre6.c +index 7d07932a60f01..06dcd6756ec41 100644 +--- a/ip/link_gre6.c ++++ b/ip/link_gre6.c +@@ -364,7 +364,7 @@ get_failed: + } else { + __u8 uval; + +- if (get_u8(&uval, *argv, 0) < -1) ++ if (get_u8(&uval, *argv, 0)) + invarg("invalid ELIM", *argv); + encap_limit = uval; + flags &= ~IP6_TNL_F_IGN_ENCAP_LIMIT; +-- +2.13.1 + diff --git a/0005-man-tc-csum.8-Fix-inconsistency-in-example-descripti.patch b/0005-man-tc-csum.8-Fix-inconsistency-in-example-descripti.patch new file mode 100644 index 0000000..3a7a7ce --- /dev/null +++ b/0005-man-tc-csum.8-Fix-inconsistency-in-example-descripti.patch @@ -0,0 +1,34 @@ +From 04475ab5abc836d24b88622bca50af452be65920 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Wed, 29 Nov 2017 18:34:09 +0100 +Subject: [PATCH] man: tc-csum.8: Fix inconsistency in example description + +Commit 6bbe5e6290db5 ("man: tc-csum.8: Fix example") changed both source +and destination IP addresses in example code but missed to update the +example's description accordingly. + +Fixes: 6bbe5e6290db5 ("man: tc-csum.8: Fix example") +Signed-off-by: Phil Sutter +(cherry picked from commit 6bf156415a588fa1c975be9a18a1579f63a936a2) +--- + man/man8/tc-csum.8 | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/man/man8/tc-csum.8 b/man/man8/tc-csum.8 +index 409ab71791cce..65724b88d0b68 100644 +--- a/man/man8/tc-csum.8 ++++ b/man/man8/tc-csum.8 +@@ -53,8 +53,8 @@ SCTP header + .B SWEETS + These are merely syntactic sugar and ignored internally. + .SH EXAMPLES +-The following performs stateless NAT for incoming packets from 192.168.1.100 to +-new destination 18.52.86.120 (0x12345678 in hex). Assuming these are UDP ++The following performs stateless NAT for incoming packets from 192.0.2.100 to ++new destination 198.51.100.1. Assuming these are UDP + packets, both IP and UDP checksums have to be recalculated: + + .RS +-- +2.13.1 + diff --git a/0006-tc-util-Don-t-call-NEXT_ARG_FWD-in-__parse_action_co.patch b/0006-tc-util-Don-t-call-NEXT_ARG_FWD-in-__parse_action_co.patch new file mode 100644 index 0000000..518108f --- /dev/null +++ b/0006-tc-util-Don-t-call-NEXT_ARG_FWD-in-__parse_action_co.patch @@ -0,0 +1,224 @@ +From 03ce79e357f3afefe8d1409a98b5ae03c611d611 Mon Sep 17 00:00:00 2001 +From: Michal Privoznik +Date: Fri, 8 Dec 2017 11:18:07 +0100 +Subject: [PATCH] tc: util: Don't call NEXT_ARG_FWD() in + __parse_action_control() + +Not all callers want parse_action_control*() to advance the +arguments. For instance act_parse_police() does the argument +advancing itself. + +Fixes: e67aba559581 ("tc: actions: add helpers to parse and print control actions") +Signed-off-by: Michal Privoznik +(cherry picked from commit 3572e01a090a298e2f4c4f796bad6639b652e031) +--- + tc/m_bpf.c | 1 + + tc/m_connmark.c | 1 + + tc/m_csum.c | 1 + + tc/m_gact.c | 10 +++++----- + tc/m_ife.c | 1 + + tc/m_mirred.c | 4 +++- + tc/m_nat.c | 1 + + tc/m_pedit.c | 1 + + tc/m_sample.c | 1 + + tc/m_skbedit.c | 1 + + tc/m_skbmod.c | 1 + + tc/m_tunnel_key.c | 1 + + tc/m_vlan.c | 1 + + tc/tc_util.c | 1 - + 14 files changed, 19 insertions(+), 7 deletions(-) + +diff --git a/tc/m_bpf.c b/tc/m_bpf.c +index e3d0a2b118384..8b091a72951c3 100644 +--- a/tc/m_bpf.c ++++ b/tc/m_bpf.c +@@ -125,6 +125,7 @@ opt_bpf: + + parse_action_control_dflt(&argc, &argv, &parm.action, + false, TC_ACT_PIPE); ++ NEXT_ARG_FWD(); + + if (argc) { + if (matches(*argv, "index") == 0) { +diff --git a/tc/m_connmark.c b/tc/m_connmark.c +index 37d7185415490..47c7a8c2b17e7 100644 +--- a/tc/m_connmark.c ++++ b/tc/m_connmark.c +@@ -82,6 +82,7 @@ parse_connmark(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, + } + + parse_action_control_dflt(&argc, &argv, &sel.action, false, TC_ACT_PIPE); ++ NEXT_ARG_FWD(); + + if (argc) { + if (matches(*argv, "index") == 0) { +diff --git a/tc/m_csum.c b/tc/m_csum.c +index 7b156734f64c5..e1352c0820f69 100644 +--- a/tc/m_csum.c ++++ b/tc/m_csum.c +@@ -124,6 +124,7 @@ parse_csum(struct action_util *a, int *argc_p, + } + + parse_action_control_dflt(&argc, &argv, &sel.action, false, TC_ACT_OK); ++ NEXT_ARG_FWD(); + + if (argc) { + if (matches(*argv, "index") == 0) { +diff --git a/tc/m_gact.c b/tc/m_gact.c +index 38949e903be36..7ea2d431f89f9 100644 +--- a/tc/m_gact.c ++++ b/tc/m_gact.c +@@ -88,14 +88,13 @@ parse_gact(struct action_util *a, int *argc_p, char ***argv_p, + if (argc < 0) + return -1; + +- +- if (matches(*argv, "gact") == 0) { +- argc--; +- argv++; +- } else if (parse_action_control(&argc, &argv, &p.action, false) == -1) { ++ if (matches(*argv, "gact") != 0 && ++ parse_action_control(&argc, &argv, &p.action, false) == -1) { + usage(); /* does not return */ + } + ++ NEXT_ARG_FWD(); ++ + #ifdef CONFIG_GACT_PROB + if (argc > 0) { + if (matches(*argv, "random") == 0) { +@@ -115,6 +114,7 @@ parse_gact(struct action_util *a, int *argc_p, char ***argv_p, + if (parse_action_control(&argc, &argv, + &pp.paction, false) == -1) + usage(); ++ NEXT_ARG_FWD(); + if (get_u16(&pp.pval, *argv, 10)) { + fprintf(stderr, "Illegal probability val 0x%x\n", pp.pval); + return -1; +diff --git a/tc/m_ife.c b/tc/m_ife.c +index 8d0fd31fb9440..34b8e03e7e589 100644 +--- a/tc/m_ife.c ++++ b/tc/m_ife.c +@@ -160,6 +160,7 @@ static int parse_ife(struct action_util *a, int *argc_p, char ***argv_p, + + parse_action_control_dflt(&argc, &argv, &p.action, false, TC_ACT_PIPE); + ++ NEXT_ARG_FWD(); + if (argc) { + if (matches(*argv, "index") == 0) { + NEXT_ARG(); +diff --git a/tc/m_mirred.c b/tc/m_mirred.c +index 2384bda1ff045..b09b016c2ca39 100644 +--- a/tc/m_mirred.c ++++ b/tc/m_mirred.c +@@ -170,8 +170,10 @@ parse_direction(struct action_util *a, int *argc_p, char ***argv_p, + } + + +- if (p.eaction == TCA_EGRESS_MIRROR || p.eaction == TCA_INGRESS_MIRROR) ++ if (p.eaction == TCA_EGRESS_MIRROR || p.eaction == TCA_INGRESS_MIRROR) { + parse_action_control(&argc, &argv, &p.action, false); ++ NEXT_ARG_FWD(); ++ } + + if (argc) { + if (iok && matches(*argv, "index") == 0) { +diff --git a/tc/m_nat.c b/tc/m_nat.c +index 31b68fb6bd784..bb455f080b3a4 100644 +--- a/tc/m_nat.c ++++ b/tc/m_nat.c +@@ -117,6 +117,7 @@ parse_nat(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, struct + + parse_action_control_dflt(&argc, &argv, &sel.action, false, TC_ACT_OK); + ++ NEXT_ARG_FWD(); + if (argc) { + if (matches(*argv, "index") == 0) { + NEXT_ARG(); +diff --git a/tc/m_pedit.c b/tc/m_pedit.c +index 5d89ab1d832ab..3391be95da38c 100644 +--- a/tc/m_pedit.c ++++ b/tc/m_pedit.c +@@ -673,6 +673,7 @@ int parse_pedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, + + parse_action_control_dflt(&argc, &argv, &sel.sel.action, false, TC_ACT_OK); + ++ NEXT_ARG_FWD(); + if (argc) { + if (matches(*argv, "index") == 0) { + NEXT_ARG(); +diff --git a/tc/m_sample.c b/tc/m_sample.c +index ff5ee6bd1ef63..31774c0e806b4 100644 +--- a/tc/m_sample.c ++++ b/tc/m_sample.c +@@ -100,6 +100,7 @@ static int parse_sample(struct action_util *a, int *argc_p, char ***argv_p, + + parse_action_control_dflt(&argc, &argv, &p.action, false, TC_ACT_PIPE); + ++ NEXT_ARG_FWD(); + if (argc) { + if (matches(*argv, "index") == 0) { + NEXT_ARG(); +diff --git a/tc/m_skbedit.c b/tc/m_skbedit.c +index aa374fcb33ed9..c41a7bb082dad 100644 +--- a/tc/m_skbedit.c ++++ b/tc/m_skbedit.c +@@ -123,6 +123,7 @@ parse_skbedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, + parse_action_control_dflt(&argc, &argv, &sel.action, + false, TC_ACT_PIPE); + ++ NEXT_ARG_FWD(); + if (argc) { + if (matches(*argv, "index") == 0) { + NEXT_ARG(); +diff --git a/tc/m_skbmod.c b/tc/m_skbmod.c +index ba79308ba8354..00318d42642a5 100644 +--- a/tc/m_skbmod.c ++++ b/tc/m_skbmod.c +@@ -125,6 +125,7 @@ static int parse_skbmod(struct action_util *a, int *argc_p, char ***argv_p, + + parse_action_control_dflt(&argc, &argv, &p.action, false, TC_ACT_PIPE); + ++ NEXT_ARG_FWD(); + if (argc) { + if (matches(*argv, "index") == 0) { + NEXT_ARG(); +diff --git a/tc/m_tunnel_key.c b/tc/m_tunnel_key.c +index 1cdd03560c357..2dc91879c2375 100644 +--- a/tc/m_tunnel_key.c ++++ b/tc/m_tunnel_key.c +@@ -175,6 +175,7 @@ static int parse_tunnel_key(struct action_util *a, int *argc_p, char ***argv_p, + parse_action_control_dflt(&argc, &argv, &parm.action, + false, TC_ACT_PIPE); + ++ NEXT_ARG_FWD(); + if (argc) { + if (matches(*argv, "index") == 0) { + NEXT_ARG(); +diff --git a/tc/m_vlan.c b/tc/m_vlan.c +index cccb4996b05f3..0b2966ce82e53 100644 +--- a/tc/m_vlan.c ++++ b/tc/m_vlan.c +@@ -137,6 +137,7 @@ static int parse_vlan(struct action_util *a, int *argc_p, char ***argv_p, + parse_action_control_dflt(&argc, &argv, &parm.action, + false, TC_ACT_PIPE); + ++ NEXT_ARG_FWD(); + if (argc) { + if (matches(*argv, "index") == 0) { + NEXT_ARG(); +diff --git a/tc/tc_util.c b/tc/tc_util.c +index b39e5508235ed..173097d2c28a0 100644 +--- a/tc/tc_util.c ++++ b/tc/tc_util.c +@@ -524,7 +524,6 @@ static int __parse_action_control(int *argc_p, char ***argv_p, int *result_p, + } + result |= jump_cnt; + } +- NEXT_ARG_FWD(); + *argc_p = argc; + *argv_p = argv; + *result_p = result; +-- +2.13.1 + diff --git a/0007-ss-remove-duplicate-assignment.patch b/0007-ss-remove-duplicate-assignment.patch new file mode 100644 index 0000000..4388296 --- /dev/null +++ b/0007-ss-remove-duplicate-assignment.patch @@ -0,0 +1,33 @@ +From 79a9bf3743acb9ebaa22e6f8eaa5a817172cca78 Mon Sep 17 00:00:00 2001 +From: Roman Mashak +Date: Mon, 11 Dec 2017 16:24:31 -0500 +Subject: [PATCH] ss: remove duplicate assignment + +Fixes: 8250bc9ff4e5 ("ss: Unify inet sockets output") +Signed-off-by: Roman Mashak +Signed-off-by: Stephen Hemminger +(cherry picked from commit 9f1a9ae88862f0e5b1beef4bef582be0d8edf3d9) + +Conflicts: + misc/ss.c +-> Context changed due to missing commit 00ac78d39c29f + ("ss: print tcpi_rcv_ssthresh"). +--- + misc/ss.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/misc/ss.c b/misc/ss.c +index 45a0c330ec55f..cc1b930a19bcb 100644 +--- a/misc/ss.c ++++ b/misc/ss.c +@@ -2227,7 +2227,6 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r, + s.sacked = info->tcpi_sacked; + s.fackets = info->tcpi_fackets; + s.reordering = info->tcpi_reordering; +- s.rcv_space = info->tcpi_rcv_space; + s.cwnd = info->tcpi_snd_cwnd; + + if (info->tcpi_snd_ssthresh < 0xFFFF) +-- +2.13.1 + diff --git a/0008-tc-bash-completion-add-missing-classid-keyword.patch b/0008-tc-bash-completion-add-missing-classid-keyword.patch new file mode 100644 index 0000000..d3bbec1 --- /dev/null +++ b/0008-tc-bash-completion-add-missing-classid-keyword.patch @@ -0,0 +1,31 @@ +From 1ac0ee2bae7fc79d7be922832de67f9df68f635f Mon Sep 17 00:00:00 2001 +From: Davide Caratti +Date: Tue, 12 Dec 2017 16:45:15 +0100 +Subject: [PATCH] tc: bash-completion: add missing 'classid' keyword + +users of 'matchall' filter can specify a value for the class id: update +bash-completion accordingly. + +Fixes: b32c0b64fa2b ("tc: bash-completion: Add support for matchall") +Signed-off-by: Davide Caratti +(cherry picked from commit 88b428f03f7c1fa64331105f54d42806cece77be) +--- + bash-completion/tc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bash-completion/tc b/bash-completion/tc +index 80d12972c8f3c..29bca5d9354d3 100644 +--- a/bash-completion/tc ++++ b/bash-completion/tc +@@ -450,7 +450,7 @@ _tc_filter_options() + return 0 + ;; + matchall) +- _tc_once_attr 'action skip_sw skip_hw' ++ _tc_once_attr 'action classid skip_sw skip_hw' + return 0 + ;; + flower) +-- +2.13.1 + diff --git a/iproute.spec b/iproute.spec index 38aa57e..eaf79f9 100644 --- a/iproute.spec +++ b/iproute.spec @@ -1,8 +1,8 @@ %global cbq_version v0.7.3 Summary: Advanced IP routing and network device configuration tools Name: iproute -Version: 4.13.0 -Release: 1%{?dist} +Version: 4.14.1 +Release: 4%{?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 @@ -15,6 +15,14 @@ Source2: avpkt # - Drop reference to Debian from ss.8 man page. # - We ship ss.ps instead of ss.html. Patch1: 0001-Documentation-fixes.patch +# Suggested backports by Fixes: tag. +Patch2: 0002-tc-move-action-cookie-print-out-of-the-stats-if.patch +Patch3: 0003-tc-remove-action-cookie-len-from-printout.patch +Patch4: 0004-link_gre6-Detect-invalid-encaplimit-values.patch +Patch5: 0005-man-tc-csum.8-Fix-inconsistency-in-example-descripti.patch +Patch6: 0006-tc-util-Don-t-call-NEXT_ARG_FWD-in-__parse_action_co.patch +Patch7: 0007-ss-remove-duplicate-assignment.patch +Patch8: 0008-tc-bash-completion-add-missing-classid-keyword.patch License: GPLv2+ and Public Domain BuildRequires: bison @@ -26,13 +34,6 @@ BuildRequires: libmnl-devel BuildRequires: libselinux-devel BuildRequires: pkgconfig %if ! 0%{?_module_build} -BuildRequires: linuxdoc-tools -BuildRequires: psutils -BuildRequires: tex(cm-super-t1.enc) -BuildRequires: tex(dvips) -BuildRequires: tex(ecrm1000.tfm) -BuildRequires: tex(latex) -BuildRequires: tex(fullpage.sty) %if 0%{?fedora} BuildRequires: linux-atm-libs-devel %endif @@ -81,8 +82,7 @@ Provides: iproute-static = %{version}-%{release} The libnetlink static library. %prep -%setup -q -n %{name}2-%{version} -%patch1 -p1 +%autosetup -p1 -n %{name}2-%{version} %build export CFLAGS="%{optflags}" @@ -90,9 +90,6 @@ export LIBDIR=/%{_libdir} export IPT_LIB_DIR=/%{_lib}/xtables ./configure make %{?_smp_mflags} -%if ! 0%{?_module_build} -make -C doc -%endif %install export DESTDIR='%{buildroot}' @@ -158,7 +155,6 @@ rm -rf '%{buildroot}%{_docdir}' %files doc %{!?_licensedir:%global license %%doc} %license COPYING -%doc doc/*.ps %doc examples %endif @@ -171,6 +167,19 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Mon Dec 11 2017 Phil Sutter - 4.14.1-4 +- Add missing patch files. + +* Mon Dec 11 2017 Phil Sutter - 4.14.1-3 +- Add upstream suggested backports. +- Make use of %%autosetup macro. + +* Wed Nov 15 2017 Phil Sutter - 4.14.1-2 +- Drop unused build dependencies + +* Wed Nov 15 2017 Phil Sutter - 4.14.1-1 +- New version 4.14.1 + * Tue Sep 19 2017 Phil Sutter - 4.13.0-1 - New version 4.13.0 diff --git a/sources b/sources index ba1a9cc..4c14c03 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-4.13.0.tar.xz) = f96d2839aec1f439bfac504c8e3881c063dacbf4c67b15f0e3da9882d2fa013cba33c23602de3eab624e0eecbb911a13967d60bddcdf097f47a580a5a77b5e3a +SHA512 (iproute2-4.14.1.tar.xz) = e593b68c46ef5f98bd6911ee7beb38388a14935a29fefabdeccc96aa012593b6f3a49b3bb1baed7d77e54f1f4a857172e058b73407f4070f158b8713f44f5d2c From b0a6784237f00880ad3de6c0fcb3eeb3fee2b1a2 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 13 Feb 2018 18:59:37 +0100 Subject: [PATCH 6/6] Add further upstream suggested backports. --- ...Reduce-scope-of-_dev_map_lookup-call.patch | 46 ++++++++++++++++ ...tect-dev_map_lookup-from-wrong-input.patch | 35 ++++++++++++ 0011-rdma-Fix-misspelled-SYS_IMAGE_GUID.patch | 32 +++++++++++ ...port-index-exists-before-operate-on-.patch | 35 ++++++++++++ ...re-ip6tnl-tunnel-Fix-noencap-support.patch | 51 ++++++++++++++++++ ...t-directory-option-for-silent-builds.patch | 40 ++++++++++++++ 0015-ip6-tunnel-Fix-tclass-output.patch | 53 +++++++++++++++++++ ...minimum-tx-rate-is-less-than-maximum.patch | 43 +++++++++++++++ ...ure-VF-min-max-rate-API-is-supported.patch | 49 +++++++++++++++++ ...address-fix-stats64-JSON-object-name.patch | 38 +++++++++++++ ...ma-Check-return-value-of-strdup-call.patch | 32 +++++++++++ iproute.spec | 16 +++++- 12 files changed, 469 insertions(+), 1 deletion(-) create mode 100644 0009-rdma-Reduce-scope-of-_dev_map_lookup-call.patch create mode 100644 0010-rdma-Protect-dev_map_lookup-from-wrong-input.patch create mode 100644 0011-rdma-Fix-misspelled-SYS_IMAGE_GUID.patch create mode 100644 0012-rdma-Check-that-port-index-exists-before-operate-on-.patch create mode 100644 0013-gre-ip6tnl-tunnel-Fix-noencap-support.patch create mode 100644 0014-Restore-no-print-directory-option-for-silent-builds.patch create mode 100644 0015-ip6-tunnel-Fix-tclass-output.patch create mode 100644 0016-iplink-Validate-minimum-tx-rate-is-less-than-maximum.patch create mode 100644 0017-ipaddress-Make-sure-VF-min-max-rate-API-is-supported.patch create mode 100644 0018-ip-address-fix-stats64-JSON-object-name.patch create mode 100644 0019-rdma-Check-return-value-of-strdup-call.patch diff --git a/0009-rdma-Reduce-scope-of-_dev_map_lookup-call.patch b/0009-rdma-Reduce-scope-of-_dev_map_lookup-call.patch new file mode 100644 index 0000000..542d503 --- /dev/null +++ b/0009-rdma-Reduce-scope-of-_dev_map_lookup-call.patch @@ -0,0 +1,46 @@ +From 673a4cc366b17a2f8805e031aaba204a89d5218f Mon Sep 17 00:00:00 2001 +From: Leon Romanovsky +Date: Wed, 27 Dec 2017 09:57:50 +0200 +Subject: [PATCH] rdma: Reduce scope of _dev_map_lookup call + +There is no external users of _dev_map_lookup function, +so let's limit its scope to be local. + +Fixes: 40df8263a0f0 ("rdma: Add dev object") +Signed-off-by: Leon Romanovsky +Signed-off-by: David Ahern +(cherry picked from commit 0fc8c30b4e3ef4c6fc1c3142f9d906ec71d46ab8) +Signed-off-by: Phil Sutter +--- + rdma/rdma.h | 1 - + rdma/utils.c | 2 +- + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/rdma/rdma.h b/rdma/rdma.h +index d551eb2966e11..c07493c912423 100644 +--- a/rdma/rdma.h ++++ b/rdma/rdma.h +@@ -78,7 +78,6 @@ int rd_exec_cmd(struct rd *rd, const struct rd_cmd *c, const char *str); + */ + void rd_free_devmap(struct rd *rd); + struct dev_map *dev_map_lookup(struct rd *rd, bool allow_port_index); +-struct dev_map *_dev_map_lookup(struct rd *rd, const char *dev_name); + + /* + * Netlink +diff --git a/rdma/utils.c b/rdma/utils.c +index eb4377cf2e185..6ce1fd70e058f 100644 +--- a/rdma/utils.c ++++ b/rdma/utils.c +@@ -236,7 +236,7 @@ int rd_recv_msg(struct rd *rd, mnl_cb_t callback, void *data, unsigned int seq) + return ret; + } + +-struct dev_map *_dev_map_lookup(struct rd *rd, const char *dev_name) ++static struct dev_map *_dev_map_lookup(struct rd *rd, const char *dev_name) + { + struct dev_map *dev_map; + +-- +2.15.1 + diff --git a/0010-rdma-Protect-dev_map_lookup-from-wrong-input.patch b/0010-rdma-Protect-dev_map_lookup-from-wrong-input.patch new file mode 100644 index 0000000..622331c --- /dev/null +++ b/0010-rdma-Protect-dev_map_lookup-from-wrong-input.patch @@ -0,0 +1,35 @@ +From 05fd4c2c9d99d757b539185c1740a5943f48188f Mon Sep 17 00:00:00 2001 +From: Leon Romanovsky +Date: Wed, 27 Dec 2017 09:57:51 +0200 +Subject: [PATCH] rdma: Protect dev_map_lookup from wrong input + +Despite the fact that all callers to dev_map_lookup are ensuring that +there is always device name prior to call to that function, it is better +and safer to check that in the dev_map_lookup itself. + +Fixes: 40df8263a0f0 ("rdma: Add dev object") +Signed-off-by: Leon Romanovsky +Signed-off-by: David Ahern +(cherry picked from commit 99da90326e6af8e17400a01cf48bb60606dd22a6) +Signed-off-by: Phil Sutter +--- + rdma/utils.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/rdma/utils.c b/rdma/utils.c +index 6ce1fd70e058f..bb29fa1a2386e 100644 +--- a/rdma/utils.c ++++ b/rdma/utils.c +@@ -253,6 +253,9 @@ struct dev_map *dev_map_lookup(struct rd *rd, bool allow_port_index) + char *dev_name; + char *slash; + ++ if (rd_no_arg(rd)) ++ return NULL; ++ + dev_name = strdup(rd_argv(rd)); + if (allow_port_index) { + slash = strrchr(dev_name, '/'); +-- +2.15.1 + diff --git a/0011-rdma-Fix-misspelled-SYS_IMAGE_GUID.patch b/0011-rdma-Fix-misspelled-SYS_IMAGE_GUID.patch new file mode 100644 index 0000000..65ad62e --- /dev/null +++ b/0011-rdma-Fix-misspelled-SYS_IMAGE_GUID.patch @@ -0,0 +1,32 @@ +From 532fb96fbfd19853cb51863378ba98b1b1cfe770 Mon Sep 17 00:00:00 2001 +From: Leon Romanovsky +Date: Wed, 27 Dec 2017 09:57:53 +0200 +Subject: [PATCH] rdma: Fix misspelled SYS_IMAGE_GUID + +SYS_IMAGE_GUIG is actually SYS_IMAGE_GUID. + +Fixes: da990ab40a92 ("rdma: Add link object") +Signed-off-by: Leon Romanovsky +Signed-off-by: David Ahern +(cherry picked from commit 4e2eb9fdf911971c8a6615e4b07656047ada0093) +Signed-off-by: Phil Sutter +--- + rdma/link.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rdma/link.c b/rdma/link.c +index 3a4b00bd533b1..f0eaccbb8be70 100644 +--- a/rdma/link.c ++++ b/rdma/link.c +@@ -30,7 +30,7 @@ static const char *caps_to_str(uint32_t idx) + x(PKEY_NVRAM, 8) \ + x(LED_INFO, 9) \ + x(SM_DISABLED, 10) \ +- x(SYS_IMAGE_GUIG, 11) \ ++ x(SYS_IMAGE_GUID, 11) \ + x(PKEY_SW_EXT_PORT_TRAP, 12) \ + x(EXTENDED_SPEEDS, 14) \ + x(CM, 16) \ +-- +2.15.1 + diff --git a/0012-rdma-Check-that-port-index-exists-before-operate-on-.patch b/0012-rdma-Check-that-port-index-exists-before-operate-on-.patch new file mode 100644 index 0000000..61341cd --- /dev/null +++ b/0012-rdma-Check-that-port-index-exists-before-operate-on-.patch @@ -0,0 +1,35 @@ +From 9e3844cbce6e9882dfe7a5cda91231f2ef9c2bb1 Mon Sep 17 00:00:00 2001 +From: Leon Romanovsky +Date: Wed, 27 Dec 2017 09:57:54 +0200 +Subject: [PATCH] rdma: Check that port index exists before operate on link + layer + +Link layer operates on port layer, hence it should check +it existence before execution commands. + +Fixes: da990ab40a92 ("rdma: Add link object") +Signed-off-by: Leon Romanovsky +Signed-off-by: David Ahern +(cherry picked from commit e3dee3c81f7fba93ae8c84f6c2fb5009c0764d65) +Signed-off-by: Phil Sutter +--- + rdma/link.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/rdma/link.c b/rdma/link.c +index f0eaccbb8be70..d93922890bb7f 100644 +--- a/rdma/link.c ++++ b/rdma/link.c +@@ -277,6 +277,9 @@ static int link_one_show(struct rd *rd) + { 0 } + }; + ++ if (!rd->port_idx) ++ return 0; ++ + return rd_exec_cmd(rd, cmds, "parameter"); + } + +-- +2.15.1 + diff --git a/0013-gre-ip6tnl-tunnel-Fix-noencap-support.patch b/0013-gre-ip6tnl-tunnel-Fix-noencap-support.patch new file mode 100644 index 0000000..9c07e51 --- /dev/null +++ b/0013-gre-ip6tnl-tunnel-Fix-noencap-support.patch @@ -0,0 +1,51 @@ +From 6272585e2488954fcfe6694f51fc22f9fd21ebf6 Mon Sep 17 00:00:00 2001 +From: Serhey Popovych +Date: Wed, 27 Dec 2017 13:28:14 +0200 +Subject: [PATCH] gre,ip6tnl/tunnel: Fix noencap- support + +We must clear bit, not set all but given bit. + +Fixes: 858dbb208e39 ("ip link: Add support for remote checksum offload to IP tunnels") +Fixes: 73516e128a5a ("ip6tnl: Support for fou encapsulation" +Signed-off-by: Serhey Popovych +(cherry picked from commit 147ade01b036aa0b4d6041ea0ef92608a4ded72c) +Signed-off-by: Phil Sutter +--- + ip/link_gre.c | 4 ++-- + ip/link_ip6tnl.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/ip/link_gre.c b/ip/link_gre.c +index 9ea2970cadc24..72d172a43bfa6 100644 +--- a/ip/link_gre.c ++++ b/ip/link_gre.c +@@ -315,11 +315,11 @@ get_failed: + } else if (strcmp(*argv, "encap-udp6-csum") == 0) { + encapflags |= TUNNEL_ENCAP_FLAG_CSUM6; + } else if (strcmp(*argv, "noencap-udp6-csum") == 0) { +- encapflags |= ~TUNNEL_ENCAP_FLAG_CSUM6; ++ encapflags &= ~TUNNEL_ENCAP_FLAG_CSUM6; + } else if (strcmp(*argv, "encap-remcsum") == 0) { + encapflags |= TUNNEL_ENCAP_FLAG_REMCSUM; + } else if (strcmp(*argv, "noencap-remcsum") == 0) { +- encapflags |= ~TUNNEL_ENCAP_FLAG_REMCSUM; ++ encapflags &= ~TUNNEL_ENCAP_FLAG_REMCSUM; + } else if (strcmp(*argv, "external") == 0) { + metadata = 1; + } else if (strcmp(*argv, "ignore-df") == 0) { +diff --git a/ip/link_ip6tnl.c b/ip/link_ip6tnl.c +index a41990068f0f7..3e92748c9a0aa 100644 +--- a/ip/link_ip6tnl.c ++++ b/ip/link_ip6tnl.c +@@ -298,7 +298,7 @@ get_failed: + } else if (strcmp(*argv, "encap-remcsum") == 0) { + encapflags |= TUNNEL_ENCAP_FLAG_REMCSUM; + } else if (strcmp(*argv, "noencap-remcsum") == 0) { +- encapflags |= ~TUNNEL_ENCAP_FLAG_REMCSUM; ++ encapflags &= ~TUNNEL_ENCAP_FLAG_REMCSUM; + } else if (strcmp(*argv, "external") == 0) { + metadata = 1; + } else +-- +2.15.1 + diff --git a/0014-Restore-no-print-directory-option-for-silent-builds.patch b/0014-Restore-no-print-directory-option-for-silent-builds.patch new file mode 100644 index 0000000..c9ce890 --- /dev/null +++ b/0014-Restore-no-print-directory-option-for-silent-builds.patch @@ -0,0 +1,40 @@ +From 8dc06b675f9b3dc83573028fc245ab1090ac56d0 Mon Sep 17 00:00:00 2001 +From: David Ahern +Date: Fri, 5 Jan 2018 19:42:05 -0800 +Subject: [PATCH] Restore --no-print-directory option for silent builds + +Commit 69fed534a533 ("change how Config is used in Makefile's") removed +Config from Makefile. Config had the checks to set VERBOSE based on user +request and VERBOSE is used to add the --no-print-directory argument. +Since Config is gone, add the relevant setup for VERBOSE to Makefile +to restore quieter builds by default. + +Fixes: 69fed534a533 ("change how Config is used in Makefile's") +Signed-off-by: David Ahern +Signed-off-by: Stephen Hemminger +(cherry picked from commit ac6561417a4d0d4167c1b54e7d163e2062d7f430) +Signed-off-by: Phil Sutter +--- + Makefile | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/Makefile b/Makefile +index 6ad9610430526..48fa05c9d4913 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,5 +1,12 @@ + # Top level Makefile for iproute2 + ++ifeq ("$(origin V)", "command line") ++VERBOSE = $(V) ++endif ++ifndef VERBOSE ++VERBOSE = 0 ++endif ++ + ifeq ($(VERBOSE),0) + MAKEFLAGS += --no-print-directory + endif +-- +2.15.1 + diff --git a/0015-ip6-tunnel-Fix-tclass-output.patch b/0015-ip6-tunnel-Fix-tclass-output.patch new file mode 100644 index 0000000..1e718d6 --- /dev/null +++ b/0015-ip6-tunnel-Fix-tclass-output.patch @@ -0,0 +1,53 @@ +From d23faa40def513ce17fb2f7ed0af7437859e33ed Mon Sep 17 00:00:00 2001 +From: Serhey Popovych +Date: Wed, 10 Jan 2018 17:53:09 +0200 +Subject: [PATCH] ip6/tunnel: Fix tclass output + +In link_gre6.c it seems copy paste error: tclass is 8 bits, +not 20 as flowlabel. + +In link_iptnl.c rename "flowinfo_tclass" to "tclass" as it +correct name since flowinfo is implementation internal name +used to label combined within u32 attribute tclass and +flowlabel. + +Fixes: 1facc1c61c07 ("ip: link_ip6tnl.c: add json output support") +Fixes: 2e706e12d9b0 ("Merge branch 'master' into net-next") +Signed-off-by: Serhey Popovych +Signed-off-by: Stephen Hemminger +(cherry picked from commit b76b24006cdbb4c29ad162e61bac720203ac2cda) +Signed-off-by: Phil Sutter +--- + ip/link_gre6.c | 2 +- + ip/link_ip6tnl.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ip/link_gre6.c b/ip/link_gre6.c +index 06dcd6756ec41..7920c9a207c29 100644 +--- a/ip/link_gre6.c ++++ b/ip/link_gre6.c +@@ -499,7 +499,7 @@ static void gre_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[]) + if (is_json_context()) { + SPRINT_BUF(b1); + +- snprintf(b1, sizeof(b1), "0x%05x", ++ snprintf(b1, sizeof(b1), "0x%02x", + ntohl(flowinfo & IP6_FLOWINFO_TCLASS) >> 20); + print_string(PRINT_JSON, "tclass", NULL, b1); + } else { +diff --git a/ip/link_ip6tnl.c b/ip/link_ip6tnl.c +index 3e92748c9a0aa..f922095eea32c 100644 +--- a/ip/link_ip6tnl.c ++++ b/ip/link_ip6tnl.c +@@ -410,7 +410,7 @@ static void ip6tunnel_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb + SPRINT_BUF(b1); + + snprintf(b1, sizeof(b1), "0x%02x", (__u8)(val >> 20)); +- print_string(PRINT_JSON, "flowinfo_tclass", NULL, b1); ++ print_string(PRINT_JSON, "tclass", NULL, b1); + } else { + printf("tclass 0x%02x ", (__u8)(val >> 20)); + } +-- +2.15.1 + diff --git a/0016-iplink-Validate-minimum-tx-rate-is-less-than-maximum.patch b/0016-iplink-Validate-minimum-tx-rate-is-less-than-maximum.patch new file mode 100644 index 0000000..eebb89f --- /dev/null +++ b/0016-iplink-Validate-minimum-tx-rate-is-less-than-maximum.patch @@ -0,0 +1,43 @@ +From 6d1d262d4031164a00182cf67b181704e5d9fe76 Mon Sep 17 00:00:00 2001 +From: Gal Pressman +Date: Tue, 16 Jan 2018 15:41:58 +0200 +Subject: [PATCH] iplink: Validate minimum tx rate is less than maximum tx rate + +According to the documentation (man ip-link), the minimum TXRATE should +be always <= Maximum TXRATE, but commit f89a2a05ffa9 ("Add support to +configure SR-IOV VF minimum and maximum Tx rate through ip tool") didn't +enforce it. + +Fixes: f89a2a05ffa9 ("Add support to configure SR-IOV VF minimum and maximum Tx rate through ip tool") +Cc: Sucheta Chakraborty +Signed-off-by: Gal Pressman +Reviewed-by: Eran Ben Elisha +Reviewed-by: Leon Romanovsky +(cherry picked from commit 04be08e0bd2ed67bbedb787b70d1d73e91322d75) +Signed-off-by: Phil Sutter +--- + ip/iplink.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/ip/iplink.c b/ip/iplink.c +index 6a96ea9ff56a7..47723f091196a 100644 +--- a/ip/iplink.c ++++ b/ip/iplink.c +@@ -531,6 +531,14 @@ static int iplink_parse_vf(int vf, int *argcp, char ***argvp, + if (tivt.max_tx_rate == -1) + tivt.max_tx_rate = tmax; + } ++ ++ if (tivt.max_tx_rate && tivt.min_tx_rate > tivt.max_tx_rate) { ++ fprintf(stderr, ++ "Invalid min_tx_rate %d - must be <= max_tx_rate %d\n", ++ tivt.min_tx_rate, tivt.max_tx_rate); ++ return -1; ++ } ++ + addattr_l(&req->n, sizeof(*req), IFLA_VF_RATE, &tivt, + sizeof(tivt)); + } +-- +2.15.1 + diff --git a/0017-ipaddress-Make-sure-VF-min-max-rate-API-is-supported.patch b/0017-ipaddress-Make-sure-VF-min-max-rate-API-is-supported.patch new file mode 100644 index 0000000..4bc40bd --- /dev/null +++ b/0017-ipaddress-Make-sure-VF-min-max-rate-API-is-supported.patch @@ -0,0 +1,49 @@ +From 15466c4fe44344aad9086acef31a295e93a9917d Mon Sep 17 00:00:00 2001 +From: Gal Pressman +Date: Tue, 16 Jan 2018 15:41:59 +0200 +Subject: [PATCH] ipaddress: Make sure VF min/max rate API is supported before + using it + +When using the new minimum rate API and providing only one parameter +(minimum rate/maximum rate), we query the VF min and max rate regardless +of kernel support. +This resulted in segmentation fault in ipaddr_loop_each_vf, which tries +to access NULL pointer. + +This patch identifies such cases by testing the VF table for NULL +pointer in IFLA_VF_RATE, and aborts the operation. +Aborting on the first VF is valid since if the kernel does not support +the new API for the first VF, it will not support it for the other VFs +as well. + +Fixes: f89a2a05ffa9 ("Add support to configure SR-IOV VF minimum and maximum Tx rate through ip tool") +Cc: Sucheta Chakraborty +Signed-off-by: Gal Pressman +Reviewed-by: Eran Ben Elisha +Reviewed-by: Leon Romanovsky +(cherry picked from commit 39315157ab16205846ed34996cf4c8c0f58113c0) +Signed-off-by: Phil Sutter +--- + ip/ipaddress.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/ip/ipaddress.c b/ip/ipaddress.c +index 9e9a7e0a6477f..bf27c15b4f718 100644 +--- a/ip/ipaddress.c ++++ b/ip/ipaddress.c +@@ -2251,6 +2251,12 @@ ipaddr_loop_each_vf(struct rtattr *tb[], int vfnum, int *min, int *max) + + for (i = RTA_DATA(vflist); RTA_OK(i, rem); i = RTA_NEXT(i, rem)) { + parse_rtattr_nested(vf, IFLA_VF_MAX, i); ++ ++ if (!vf[IFLA_VF_RATE]) { ++ fprintf(stderr, "VF min/max rate API not supported\n"); ++ exit(1); ++ } ++ + vf_rate = RTA_DATA(vf[IFLA_VF_RATE]); + if (vf_rate->vf == vfnum) { + *min = vf_rate->min_tx_rate; +-- +2.15.1 + diff --git a/0018-ip-address-fix-stats64-JSON-object-name.patch b/0018-ip-address-fix-stats64-JSON-object-name.patch new file mode 100644 index 0000000..162ad5b --- /dev/null +++ b/0018-ip-address-fix-stats64-JSON-object-name.patch @@ -0,0 +1,38 @@ +From ef0a8addf8bb3678338a37be12eb55cfe748f0f9 Mon Sep 17 00:00:00 2001 +From: Jakub Kicinski +Date: Fri, 26 Jan 2018 11:30:35 -0800 +Subject: [PATCH] ip: address: fix stats64 JSON object name + +The JSON object name for statistics in ip link show is "stats644". +Looks like a typo, commit d0e720111aad ("ip: ipaddress.c: add support +for json output") contains an example with the expected "stats64" name. + +The fact that no one has noticed until now is probably an indication +that no one is using this object. Hopefully it's not too late to fix +this, although IIUC this has already been in 4.13 and 4.14 releases :S + +Fixes: d0e720111aad ("ip: ipaddress.c: add support for json output") +Signed-off-by: Jakub Kicinski +Signed-off-by: Stephen Hemminger +(cherry picked from commit 7f536df7f30f340eed7c4e3c9fee6c8c1f6d8daa) +Signed-off-by: Phil Sutter +--- + ip/ipaddress.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ip/ipaddress.c b/ip/ipaddress.c +index bf27c15b4f718..97cb67411138d 100644 +--- a/ip/ipaddress.c ++++ b/ip/ipaddress.c +@@ -598,7 +598,7 @@ static void print_link_stats64(FILE *fp, const struct rtnl_link_stats64 *s, + const struct rtattr *carrier_changes) + { + if (is_json_context()) { +- open_json_object("stats644"); ++ open_json_object("stats64"); + + /* RX stats */ + open_json_object("rx"); +-- +2.15.1 + diff --git a/0019-rdma-Check-return-value-of-strdup-call.patch b/0019-rdma-Check-return-value-of-strdup-call.patch new file mode 100644 index 0000000..6a112d2 --- /dev/null +++ b/0019-rdma-Check-return-value-of-strdup-call.patch @@ -0,0 +1,32 @@ +From af2cc3dd9200a73e93ed7bf3eb9cce29cd9c17dd Mon Sep 17 00:00:00 2001 +From: Leon Romanovsky +Date: Wed, 31 Jan 2018 10:11:56 +0200 +Subject: [PATCH] rdma: Check return value of strdup call + +Fixes: 74bd75c2b68d ("rdma: Add basic infrastructure for RDMA tool") +Signed-off-by: Leon Romanovsky +Signed-off-by: Stephen Hemminger +(cherry picked from commit 5f8265536f6f511ec62d3a0ee7e1324a8720f7e3) +Signed-off-by: Phil Sutter +--- + rdma/utils.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/rdma/utils.c b/rdma/utils.c +index bb29fa1a2386e..47ca2969706fb 100644 +--- a/rdma/utils.c ++++ b/rdma/utils.c +@@ -67,6 +67,10 @@ static struct dev_map *dev_map_alloc(const char *dev_name) + if (!dev_map) + return NULL; + dev_map->dev_name = strdup(dev_name); ++ if (!dev_map->dev_name) { ++ free(dev_map); ++ return NULL; ++ } + + return dev_map; + } +-- +2.15.1 + diff --git a/iproute.spec b/iproute.spec index eaf79f9..f2457c5 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 4.14.1 -Release: 4%{?dist} +Release: 5%{?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 @@ -23,6 +23,17 @@ Patch5: 0005-man-tc-csum.8-Fix-inconsistency-in-example-descripti.pa Patch6: 0006-tc-util-Don-t-call-NEXT_ARG_FWD-in-__parse_action_co.patch Patch7: 0007-ss-remove-duplicate-assignment.patch Patch8: 0008-tc-bash-completion-add-missing-classid-keyword.patch +Patch9: 0009-rdma-Reduce-scope-of-_dev_map_lookup-call.patch +Patch10: 0010-rdma-Protect-dev_map_lookup-from-wrong-input.patch +Patch11: 0011-rdma-Fix-misspelled-SYS_IMAGE_GUID.patch +Patch12: 0012-rdma-Check-that-port-index-exists-before-operate-on-.patch +Patch13: 0013-gre-ip6tnl-tunnel-Fix-noencap-support.patch +Patch14: 0014-Restore-no-print-directory-option-for-silent-builds.patch +Patch15: 0015-ip6-tunnel-Fix-tclass-output.patch +Patch16: 0016-iplink-Validate-minimum-tx-rate-is-less-than-maximum.patch +Patch17: 0017-ipaddress-Make-sure-VF-min-max-rate-API-is-supported.patch +Patch18: 0018-ip-address-fix-stats64-JSON-object-name.patch +Patch19: 0019-rdma-Check-return-value-of-strdup-call.patch License: GPLv2+ and Public Domain BuildRequires: bison @@ -167,6 +178,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Tue Feb 13 2018 Phil Sutter - 4.14.1-5 +- Add further upstream suggested backports. + * Mon Dec 11 2017 Phil Sutter - 4.14.1-4 - Add missing patch files.