Files
linux-stable-mirror/include/net
Fernando Fernandez ManceraandGreg Kroah-Hartman 8d5a2c94c2 netfilter: nf_conncount: rework API to use sk_buff directly
[ Upstream commit be102eb6a0 ]

When using nf_conncount infrastructure for non-confirmed connections a
duplicated track is possible due to an optimization introduced since
commit d265929930 ("netfilter: nf_conncount: reduce unnecessary GC").

In order to fix this introduce a new conncount API that receives
directly an sk_buff struct.  It fetches the tuple and zone and the
corresponding ct from it. It comes with both existing conncount variants
nf_conncount_count_skb() and nf_conncount_add_skb(). In addition remove
the old API and adjust all the users to use the new one.

This way, for each sk_buff struct it is possible to check if there is a
ct present and already confirmed. If so, skip the add operation.

Fixes: d265929930 ("netfilter: nf_conncount: reduce unnecessary GC")
Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2026-01-11 15:18:32 +01:00
..
2025-02-21 13:49:02 +01:00
2024-01-31 16:17:04 -08:00
2025-03-07 16:56:44 +01:00
2024-12-19 18:08:53 +01:00
2025-02-21 13:50:06 +01:00
2023-10-10 22:00:46 +02:00
2023-04-13 16:55:23 +02:00
2023-06-14 11:15:20 +02:00
2025-03-07 16:56:37 +01:00
2025-03-07 16:56:37 +01:00
2023-08-11 12:08:17 +02:00