Skip to content
Commit 2bb4ecb3 authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso Committed by Greg Kroah-Hartman
Browse files

netfilter: flowtable: GC pushes back packets to classic path

[ Upstream commit 735795f6 ]

Since 41f2c7c3 ("net/sched: act_ct: Fix promotion of offloaded
unreplied tuple"), flowtable GC pushes back flows with IPS_SEEN_REPLY
back to classic path in every run, ie. every second. This is because of
a new check for NF_FLOW_HW_ESTABLISHED which is specific of sched/act_ct.

In Netfilter's flowtable case, NF_FLOW_HW_ESTABLISHED never gets set on
and IPS_SEEN_REPLY is unreliable since users decide when to offload the
flow before, such bit might be set on at a later stage.

Fix it by adding a custom .gc handler that sched/act_ct can use to
deal with its NF_FLOW_HW_ESTABLISHED bit.

Fixes: 41f2c7c3

 ("net/sched: act_ct: Fix promotion of offloaded unreplied tuple")
Reported-by: default avatarVladimir Smelhaus <vl.sm@email.cz>
Reviewed-by: default avatarPaul Blakey <paulb@nvidia.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Stable-dep-of: 125f1c7f

 ("net/sched: act_ct: Take per-cb reference to tcf_ct_flow_table")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent df01de08
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment