]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netfilter: nf_conncount: update last_gc only when GC has been performed
authorFernando Fernandez Mancera <fmancera@suse.de>
Wed, 17 Dec 2025 14:46:40 +0000 (15:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jan 2026 12:12:10 +0000 (13:12 +0100)
commit2c7c71113ed6d3e2f3aca4c088f22283016ff34f
treea66a453576343c0e3cdb0bc196e44d4fd21a036d
parent41f59278d628ffc132b2c196530355320b7da952
netfilter: nf_conncount: update last_gc only when GC has been performed

[ Upstream commit 7811ba452402d58628e68faedf38745b3d485e3c ]

Currently last_gc is being updated everytime a new connection is
tracked, that means that it is updated even if a GC wasn't performed.
With a sufficiently high packet rate, it is possible to always bypass
the GC, causing the list to grow infinitely.

Update the last_gc value only when a GC has been actually performed.

Fixes: d265929930e2 ("netfilter: nf_conncount: reduce unnecessary GC")
Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_conncount.c