Merge tag 'nf-25-04-17' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf
Pablo Neira Ayuso says: ==================== Netfilter fix for net The following batch contains one Netfilter fix for net: 1) conntrack offload bit is erroneously unset in a race scenario, from Florian Westphal. netfilter pull request 25-04-17 * tag 'nf-25-04-17' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: conntrack: fix erronous removal of offload bit ==================== Link: https://patch.msgid.link/20250417102847.16640-1-pablo@netfilter.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
@@ -383,8 +383,8 @@ static void flow_offload_del(struct nf_flowtable *flow_table,
|
||||
void flow_offload_teardown(struct flow_offload *flow)
|
||||
{
|
||||
clear_bit(IPS_OFFLOAD_BIT, &flow->ct->status);
|
||||
set_bit(NF_FLOW_TEARDOWN, &flow->flags);
|
||||
flow_offload_fixup_ct(flow);
|
||||
if (!test_and_set_bit(NF_FLOW_TEARDOWN, &flow->flags))
|
||||
flow_offload_fixup_ct(flow);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(flow_offload_teardown);
|
||||
|
||||
@@ -558,10 +558,12 @@ static void nf_flow_offload_gc_step(struct nf_flowtable *flow_table,
|
||||
|
||||
if (nf_flow_has_expired(flow) ||
|
||||
nf_ct_is_dying(flow->ct) ||
|
||||
nf_flow_custom_gc(flow_table, flow))
|
||||
nf_flow_custom_gc(flow_table, flow)) {
|
||||
flow_offload_teardown(flow);
|
||||
else if (!teardown)
|
||||
teardown = true;
|
||||
} else if (!teardown) {
|
||||
nf_flow_table_extend_ct_timeout(flow->ct);
|
||||
}
|
||||
|
||||
if (teardown) {
|
||||
if (test_bit(NF_FLOW_HW, &flow->flags)) {
|
||||
|
||||
Reference in New Issue
Block a user