]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
netfilter: conntrack: disable 0 value for conntrack_max setting
authorFlorian Westphal <fw@strlen.de>
Sun, 21 Sep 2025 15:45:30 +0000 (17:45 +0200)
committerFlorian Westphal <fw@strlen.de>
Thu, 30 Oct 2025 11:52:45 +0000 (12:52 +0100)
commit2b749f257645c54f8659bddbdb5b2ede999bec00
tree4b30ebf83ff5978968535c16060391b2927431c8
parent320d80eeb22219bc1dd14780113c36e11dad7c04
netfilter: conntrack: disable 0 value for conntrack_max setting

Undocumented historical artifact inherited from ip_conntrack.
If value is 0, then no limit is applied at all, conntrack table
can grow to huge value, only limited by size of conntrack hashes and
the kernel-internal upper limit on the hash chain lengths.

This feature makes no sense; users can just set
conntrack_max=2147483647 (INT_MAX).

Disallow a 0 value.  This will make it slightly easier to allow
per-netns constraints for this value in a future patch.

Signed-off-by: Florian Westphal <fw@strlen.de>
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_standalone.c