summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaul Blakey <paulb@nvidia.com>2021-12-14 19:24:34 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-01-27 11:04:02 +0100
commita006c84824634fd13f442cd57c1217cc2b1aedbd (patch)
tree81db8e33d58e109a667d2c258ed8f18b474831d5 /include
parent3a4ecdfc0cf49f5d5536cd244052b251f8c63365 (diff)
net/sched: flow_dissector: Fix matching on zone id for invalid conns
[ Upstream commit 3849595866166b23bf6a0cb9ff87e06423167f67 ] If ct rejects a flow, it removes the conntrack info from the skb. act_ct sets the post_ct variable so the dissector will see this case as an +tracked +invalid state, but the zone id is lost with the conntrack info. To restore the zone id on such cases, set the last executed zone, via the tc control block, when passing ct, and read it back in the dissector if there is no ct info on the skb (invalid connection). Fixes: 7baf2429a1a9 ("net/sched: cls_flower add CT_FLAGS_INVALID flag support") Signed-off-by: Paul Blakey <paulb@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/skbuff.h2
-rw-r--r--include/net/pkt_sched.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index b8c273af2910..4f31ca71a82a 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1370,7 +1370,7 @@ skb_flow_dissect_ct(const struct sk_buff *skb,
struct flow_dissector *flow_dissector,
void *target_container,
u16 *ctinfo_map, size_t mapsize,
- bool post_ct);
+ bool post_ct, u16 zone);
void
skb_flow_dissect_tunnel_info(const struct sk_buff *skb,
struct flow_dissector *flow_dissector,
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index 05f18e81f3e8..9e71691c491b 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -198,6 +198,7 @@ struct tc_skb_cb {
u16 mru;
bool post_ct;
+ u16 zone; /* Only valid if post_ct = true */
};
static inline struct tc_skb_cb *tc_skb_cb(const struct sk_buff *skb)