summaryrefslogtreecommitdiffstats
path: root/net/netfilter/nf_conntrack_ecache.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2022-04-25 15:15:41 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2022-05-13 18:56:28 +0200
commit2794cdb0b97bfe62d25c996c8afe4832207e78bc (patch)
treedacc9aa36a93afa497719bc7839977b68f127991 /net/netfilter/nf_conntrack_ecache.c
parent8169ff584003c871a226719e998bb034231954d6 (diff)
downloadlinux-2794cdb0b97bfe62d25c996c8afe4832207e78bc.tar.bz2
netfilter: nfnetlink: allow to detect if ctnetlink listeners exist
At this time, every new conntrack gets the 'event cache extension' enabled for it. This is because the 'net.netfilter.nf_conntrack_events' sysctl defaults to 1. Changing the default to 0 means that commands that rely on the event notification extension, e.g. 'conntrack -E' or conntrackd, stop working. We COULD detect if there is a listener by means of 'nfnetlink_has_listeners()' and only add the extension if this is true. The downside is a dependency from conntrack module to nfnetlink module. This adds a different way: inc/dec a counter whenever a ctnetlink group is being (un)subscribed and toggle a flag in struct net. Next patches will take advantage of this and will only add the event extension if the flag is set. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_conntrack_ecache.c')
0 files changed, 0 insertions, 0 deletions