diff --git a/.gitignore b/.gitignore index 320a98c..7380701 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /iproute2-4.12.0.tar.xz /iproute2-4.13.0.tar.xz /iproute2-4.14.1.tar.xz +/iproute2-4.15.0.tar.xz diff --git a/0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch b/0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch new file mode 100644 index 0000000..998d9fa --- /dev/null +++ b/0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.patch @@ -0,0 +1,21 @@ +From 2d6460e474e96c4ee474fc7b5b55ab04eeac4984 Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Fri, 17 Mar 2017 22:47:27 +0100 +Subject: [PATCH 1/6] Add cbq.8 as an alias to tc-cbq.8 + +Signed-off-by: Phil Sutter +--- + man/man8/cbq.8 | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 man/man8/cbq.8 + +diff --git a/man/man8/cbq.8 b/man/man8/cbq.8 +new file mode 100644 +index 0000000000000..bef35201f4eab +--- /dev/null ++++ b/man/man8/cbq.8 +@@ -0,0 +1 @@ ++.so man8/tc-cbq.8 +-- +2.15.1 + diff --git a/0001-Documentation-fixes.patch b/0001-Documentation-fixes.patch deleted file mode 100644 index c3a9185..0000000 --- a/0001-Documentation-fixes.patch +++ /dev/null @@ -1,43 +0,0 @@ -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 - ---- - 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 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 8565ccb4814aa..5a85bee6a4b7a 100644 ---- a/man/man8/ss.8 -+++ b/man/man8/ss.8 -@@ -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 ] --Please take a look at the official documentation (Debian package iproute-doc) for details regarding filters. -+Please take a look at the official documentation (package iproute\-doc) for details regarding filters. - - .SH STATE-FILTER - -@@ -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), --.BR /usr/share/doc/iproute-doc/ss.html " (package iproute­doc)", -+.BR /usr/share/doc/iproute-doc/ss.ps " (package iproute\-doc)", - .br - .BR RFC " 793 " - - https://tools.ietf.org/rfc/rfc793.txt (TCP states) --- -2.13.1 - diff --git a/0002-rdma-Reduce-scope-of-_dev_map_lookup-call.patch b/0002-rdma-Reduce-scope-of-_dev_map_lookup-call.patch new file mode 100644 index 0000000..f0c1291 --- /dev/null +++ b/0002-rdma-Reduce-scope-of-_dev_map_lookup-call.patch @@ -0,0 +1,46 @@ +From 8e8e7113d680fd344181dbaeafa5f7c4bae4805b Mon Sep 17 00:00:00 2001 +From: Leon Romanovsky +Date: Wed, 27 Dec 2017 09:57:50 +0200 +Subject: [PATCH 2/6] 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/0002-tc-flower-use-correct-type-when-calling-flower_icmp_.patch b/0002-tc-flower-use-correct-type-when-calling-flower_icmp_.patch deleted file mode 100644 index 1ca3e04..0000000 --- a/0002-tc-flower-use-correct-type-when-calling-flower_icmp_.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 2706951bc0dad80596f172e9197452163bc9e067 Mon Sep 17 00:00:00 2001 -From: Simon Horman -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 -(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 - 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 deleted file mode 100644 index 28c78a3..0000000 --- a/0002-tc-move-action-cookie-print-out-of-the-stats-if.patch +++ /dev/null @@ -1,50 +0,0 @@ -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-bpf-test-for-valid-type-in-bpf_get_work_dir.patch b/0003-bpf-test-for-valid-type-in-bpf_get_work_dir.patch deleted file mode 100644 index 6b40d60..0000000 --- a/0003-bpf-test-for-valid-type-in-bpf_get_work_dir.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 305197a2378ffb581f1eca3ec804f76690be7b5a Mon Sep 17 00:00:00 2001 -From: Daniel Borkmann -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 -Signed-off-by: Daniel Borkmann -(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 - diff --git a/0003-rdma-Protect-dev_map_lookup-from-wrong-input.patch b/0003-rdma-Protect-dev_map_lookup-from-wrong-input.patch new file mode 100644 index 0000000..2d5419d --- /dev/null +++ b/0003-rdma-Protect-dev_map_lookup-from-wrong-input.patch @@ -0,0 +1,35 @@ +From b171f889bdc8d4e11af8bc6ea947860536d7ade8 Mon Sep 17 00:00:00 2001 +From: Leon Romanovsky +Date: Wed, 27 Dec 2017 09:57:51 +0200 +Subject: [PATCH 3/6] 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/0003-tc-remove-action-cookie-len-from-printout.patch b/0003-tc-remove-action-cookie-len-from-printout.patch deleted file mode 100644 index 7ef2fcb..0000000 --- a/0003-tc-remove-action-cookie-len-from-printout.patch +++ /dev/null @@ -1,31 +0,0 @@ -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 deleted file mode 100644 index af51d99..0000000 --- a/0004-link_gre6-Detect-invalid-encaplimit-values.patch +++ /dev/null @@ -1,31 +0,0 @@ -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/0004-rdma-Fix-misspelled-SYS_IMAGE_GUID.patch b/0004-rdma-Fix-misspelled-SYS_IMAGE_GUID.patch new file mode 100644 index 0000000..746c9c6 --- /dev/null +++ b/0004-rdma-Fix-misspelled-SYS_IMAGE_GUID.patch @@ -0,0 +1,32 @@ +From f17a763593248d354a3af9ffbba260fedb2a9eeb Mon Sep 17 00:00:00 2001 +From: Leon Romanovsky +Date: Wed, 27 Dec 2017 09:57:53 +0200 +Subject: [PATCH 4/6] 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/0005-man-tc-csum.8-Fix-inconsistency-in-example-descripti.patch b/0005-man-tc-csum.8-Fix-inconsistency-in-example-descripti.patch deleted file mode 100644 index 3a7a7ce..0000000 --- a/0005-man-tc-csum.8-Fix-inconsistency-in-example-descripti.patch +++ /dev/null @@ -1,34 +0,0 @@ -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/0005-rdma-Check-that-port-index-exists-before-operate-on-.patch b/0005-rdma-Check-that-port-index-exists-before-operate-on-.patch new file mode 100644 index 0000000..9262f73 --- /dev/null +++ b/0005-rdma-Check-that-port-index-exists-before-operate-on-.patch @@ -0,0 +1,35 @@ +From bde8ace828708b5d49ce650163c6a411065dafb4 Mon Sep 17 00:00:00 2001 +From: Leon Romanovsky +Date: Wed, 27 Dec 2017 09:57:54 +0200 +Subject: [PATCH 5/6] 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/0006-rdma-Check-return-value-of-strdup-call.patch b/0006-rdma-Check-return-value-of-strdup-call.patch new file mode 100644 index 0000000..8bbc5d1 --- /dev/null +++ b/0006-rdma-Check-return-value-of-strdup-call.patch @@ -0,0 +1,32 @@ +From cda8da1af7517ee2fffb5bbedcf7488701ba332e Mon Sep 17 00:00:00 2001 +From: Leon Romanovsky +Date: Wed, 31 Jan 2018 10:11:56 +0200 +Subject: [PATCH 6/6] 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/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 deleted file mode 100644 index 518108f..0000000 --- a/0006-tc-util-Don-t-call-NEXT_ARG_FWD-in-__parse_action_co.patch +++ /dev/null @@ -1,224 +0,0 @@ -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 deleted file mode 100644 index 4388296..0000000 --- a/0007-ss-remove-duplicate-assignment.patch +++ /dev/null @@ -1,33 +0,0 @@ -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 deleted file mode 100644 index d3bbec1..0000000 --- a/0008-tc-bash-completion-add-missing-classid-keyword.patch +++ /dev/null @@ -1,31 +0,0 @@ -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 1d02701..c3b6fb7 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.14.1 -Release: 6%{?dist} +Version: 4.15.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 @@ -12,17 +12,13 @@ Source2: avpkt # Fedora local docs changes: # - We ship cbq.init-v0.7.3 as cbq binary, so have a cbq.8 man page which links # to tc-cbq.8. -# - Drop reference to Debian from ss.8 man page. -# - We ship ss.ps instead of ss.html. -Patch1: 0001-Documentation-fixes.patch +Patch1: 0001-Add-cbq.8-as-an-alias-to-tc-cbq.8.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 +Patch2: 0002-rdma-Reduce-scope-of-_dev_map_lookup-call.patch +Patch3: 0003-rdma-Protect-dev_map_lookup-from-wrong-input.patch +Patch4: 0004-rdma-Fix-misspelled-SYS_IMAGE_GUID.patch +Patch5: 0005-rdma-Check-that-port-index-exists-before-operate-on-.patch +Patch6: 0006-rdma-Check-return-value-of-strdup-call.patch License: GPLv2+ and Public Domain BuildRequires: bison @@ -168,6 +164,9 @@ rm -rf '%{buildroot}%{_docdir}' %{_includedir}/iproute2/bpf_elf.h %changelog +* Fri Feb 09 2018 Phil Sutter - 4.15.0-1 +- New version 4.15.0 + * Fri Feb 9 2018 Florian Weimer - 4.14.1-6 - Use LDFLAGS defaults from redhat-rpm-config diff --git a/sources b/sources index 4c14c03..15cb26e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (iproute2-4.14.1.tar.xz) = e593b68c46ef5f98bd6911ee7beb38388a14935a29fefabdeccc96aa012593b6f3a49b3bb1baed7d77e54f1f4a857172e058b73407f4070f158b8713f44f5d2c +SHA512 (iproute2-4.15.0.tar.xz) = bcc54b8dc83d7b0e759a2de77eb38fed483d7f7f82698f482e0259000f2f55ba79c556b721730eb999e85c865ad136fd7549304ebe936545e02e848ba7f698bc