From 6b1c99a4a98ff7798d3377cb4d48eef1bb8a8b68 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 29 Jun 2021 17:55:10 +0000 Subject: [PATCH] import iproute-5.12.0-1.el8 --- ...-option-to-match-on-related-ct-state.patch | 73 +++++++++++++++++++ ...missing-ct_state-flags-to-usage-desc.patch | 43 +++++++++++ SPECS/iproute.spec | 8 +- 3 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 SOURCES/0001-tc-f_flower-Add-option-to-match-on-related-ct-state.patch create mode 100644 SOURCES/0002-tc-f_flower-Add-missing-ct_state-flags-to-usage-desc.patch diff --git a/SOURCES/0001-tc-f_flower-Add-option-to-match-on-related-ct-state.patch b/SOURCES/0001-tc-f_flower-Add-option-to-match-on-related-ct-state.patch new file mode 100644 index 0000000..d68d739 --- /dev/null +++ b/SOURCES/0001-tc-f_flower-Add-option-to-match-on-related-ct-state.patch @@ -0,0 +1,73 @@ +From d9bcc70051d23c62cc802a356dc7e4324398765e Mon Sep 17 00:00:00 2001 +Message-Id: +From: Andrea Claudi +Date: Mon, 28 Jun 2021 15:22:17 +0200 +Subject: [PATCH] tc: f_flower: Add option to match on related ct state + +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1957243 +Upstream Status: unknown commit 7fda6c58 + +commit 7fda6c588a295ad381fdf0b9b9971169b2f9d9dc +Author: Ariel Levkovich +Date: Fri May 21 20:07:06 2021 +0300 + + tc: f_flower: Add option to match on related ct state + + Add support for matching on ct_state flag related. + The related state indicates a packet is associated with an existing + connection. + + Example: + $ tc filter add dev ens1f0_0 ingress prio 1 chain 1 proto ip flower \ + ct_state -est-rel+trk \ + action mirred egress redirect dev ens1f0_1 + + $ tc filter add dev ens1f0_0 ingress prio 1 chain 1 proto ip flower \ + ct_state +rel+trk \ + action mirred egress redirect dev ens1f0_1 + + Signed-off-by: Ariel Levkovich + Reviewed-by: Jiri Pirko + Signed-off-by: David Ahern +--- + man/man8/tc-flower.8 | 2 ++ + tc/f_flower.c | 3 ++- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/man/man8/tc-flower.8 b/man/man8/tc-flower.8 +index f7336b62..4541d937 100644 +--- a/man/man8/tc-flower.8 ++++ b/man/man8/tc-flower.8 +@@ -391,6 +391,8 @@ rpl - The packet is in the reply direction, meaning that it is in the opposite d + .TP + inv - The state is invalid. The packet couldn't be associated to a connection. + .TP ++rel - The packet is related to an existing connection. ++.TP + Example: +trk+est + .RE + .TP +diff --git a/tc/f_flower.c b/tc/f_flower.c +index 53822a95..29db2e23 100644 +--- a/tc/f_flower.c ++++ b/tc/f_flower.c +@@ -94,7 +94,7 @@ static void explain(void) + " LSE := lse depth DEPTH { label LABEL | tc TC | bos BOS | ttl TTL }\n" + " FILTERID := X:Y:Z\n" + " MASKED_LLADDR := { LLADDR | LLADDR/MASK | LLADDR/BITS }\n" +- " MASKED_CT_STATE := combination of {+|-} and flags trk,est,new\n" ++ " MASKED_CT_STATE := combination of {+|-} and flags trk,est,new,rel\n" + " ACTION-SPEC := ... look at individual actions\n" + "\n" + "NOTE: CLASSID, IP-PROTO are parsed as hexadecimal input.\n" +@@ -345,6 +345,7 @@ static struct flower_ct_states { + { "trk", TCA_FLOWER_KEY_CT_FLAGS_TRACKED }, + { "new", TCA_FLOWER_KEY_CT_FLAGS_NEW }, + { "est", TCA_FLOWER_KEY_CT_FLAGS_ESTABLISHED }, ++ { "rel", TCA_FLOWER_KEY_CT_FLAGS_RELATED }, + { "inv", TCA_FLOWER_KEY_CT_FLAGS_INVALID }, + { "rpl", TCA_FLOWER_KEY_CT_FLAGS_REPLY }, + }; +-- +2.31.1 + diff --git a/SOURCES/0002-tc-f_flower-Add-missing-ct_state-flags-to-usage-desc.patch b/SOURCES/0002-tc-f_flower-Add-missing-ct_state-flags-to-usage-desc.patch new file mode 100644 index 0000000..023a925 --- /dev/null +++ b/SOURCES/0002-tc-f_flower-Add-missing-ct_state-flags-to-usage-desc.patch @@ -0,0 +1,43 @@ +From 5f12d06dac98f9085273ce548d2ed13341c920fe Mon Sep 17 00:00:00 2001 +Message-Id: <5f12d06dac98f9085273ce548d2ed13341c920fe.1624894546.git.aclaudi@redhat.com> +In-Reply-To: +References: +From: Andrea Claudi +Date: Mon, 28 Jun 2021 15:22:17 +0200 +Subject: [PATCH] tc: f_flower: Add missing ct_state flags to usage description + +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1957243 +Upstream Status: unknown commit 825bd5da + +commit 825bd5dacb98597a5595b470bd275bb103a7b9c2 +Author: Ariel Levkovich +Date: Fri May 21 20:07:07 2021 +0300 + + tc: f_flower: Add missing ct_state flags to usage description + + Add ct_state flags rpl and inv to the commands usage + description + + Signed-off-by: Ariel Levkovich + Reviewed-by: Jiri Pirko + Signed-off-by: David Ahern +--- + 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 29db2e23..c5af0276 100644 +--- a/tc/f_flower.c ++++ b/tc/f_flower.c +@@ -94,7 +94,7 @@ static void explain(void) + " LSE := lse depth DEPTH { label LABEL | tc TC | bos BOS | ttl TTL }\n" + " FILTERID := X:Y:Z\n" + " MASKED_LLADDR := { LLADDR | LLADDR/MASK | LLADDR/BITS }\n" +- " MASKED_CT_STATE := combination of {+|-} and flags trk,est,new,rel\n" ++ " MASKED_CT_STATE := combination of {+|-} and flags trk,est,new,rel,rpl,inv\n" + " ACTION-SPEC := ... look at individual actions\n" + "\n" + "NOTE: CLASSID, IP-PROTO are parsed as hexadecimal input.\n" +-- +2.31.1 + diff --git a/SPECS/iproute.spec b/SPECS/iproute.spec index 63d37bd..97dd254 100644 --- a/SPECS/iproute.spec +++ b/SPECS/iproute.spec @@ -1,11 +1,13 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 5.12.0 -Release: 0%{?dist}%{?buildid} +Release: 1%{?dist}%{?buildid} 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 Source1: rt_dsfield.deprecated +Patch0: 0001-tc-f_flower-Add-option-to-match-on-related-ct-state.patch +Patch1: 0002-tc-f_flower-Add-missing-ct_state-flags-to-usage-desc.patch License: GPLv2+ and Public Domain BuildRequires: bison BuildRequires: elfutils-libelf-devel @@ -130,6 +132,10 @@ cat %{SOURCE1} >>%{buildroot}%{_sysconfdir}/iproute2/rt_dsfield %{_includedir}/iproute2/bpf_elf.h %changelog +* Mon Jun 28 2021 Andrea Claudi [5.12.0-1.el8] +- tc: f_flower: Add missing ct_state flags to usage description (Andrea Claudi) [1957243] +- tc: f_flower: Add option to match on related ct state (Andrea Claudi) [1957243] + * Thu Apr 29 2021 Andrea Claudi [5.12.0-0.el8] - New version 5.12.0 [1939382]