]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: conntrack: add nf_conntrack_events autodetect mode
authorFlorian Westphal <fw@strlen.de>
Mon, 25 Apr 2022 13:15:43 +0000 (15:15 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 13 May 2022 16:56:28 +0000 (18:56 +0200)
commit527e606f21d96f8cc582da896e6bf554a9a6f578
treed794a12f356af5a65ff9a49cc964989635570fed
parent5889b1f1bbca9cdf0a4d9f7959a259c32a0302c4
netfilter: conntrack: add nf_conntrack_events autodetect mode

This adds the new nf_conntrack_events=2 mode and makes it the
default.

This leverages the earlier flag in struct net to allow to avoid
the event extension as long as no event listener is active in
the namespace.

This avoids, for most cases, allocation of ct->ext area.
A followup patch will take further advantage of this by avoiding
calls down into the event framework if the extension isn't present.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Documentation/networking/nf_conntrack-sysctl.rst
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_ecache.c
net/netfilter/nf_conntrack_standalone.c