linux/include/net/netns
Florian Westphal 2794cdb0b9 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>
2022-05-13 18:56:28 +02:00
..
bpf.h bpf: Invert the dependency between bpf-netns.h and netns/bpf.h 2021-12-29 20:03:05 -08:00
can.h can: remove obsolete version strings 2020-10-12 10:06:39 +02:00
conntrack.h netfilter: nfnetlink: allow to detect if ctnetlink listeners exist 2022-05-13 18:56:28 +02:00
core.h txhash: Make rethinking txhash behavior configurable via sysctl 2022-01-31 15:05:24 +00:00
generic.h
hash.h
ieee802154_6lowpan.h
ipv4.h tcp: adjust TSO packet sizes based on min_rtt 2022-03-09 20:05:44 -08:00
ipv6.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-02-17 11:44:20 -08:00
mctp.h mctp: Allow per-netns default networks 2021-07-29 15:06:50 +01:00
mib.h net: reorganize fields in netns_mib 2021-04-02 14:31:44 -07:00
mpls.h
netfilter.h netfilter: conntrack: fix boot failure with nf_conntrack.enable_hooks=1 2021-09-28 13:04:55 +02:00
nexthop.h nexthop: Convert to blocking notification chain 2020-09-15 16:31:17 -07:00
nftables.h net: remove obsolete members from struct net 2021-04-06 00:34:53 +02:00
packet.h
sctp.h sctp: add probe_interval in sysctl and sock/asoc/transport 2021-06-22 11:28:51 -07:00
smc.h net/smc: add sysctl for autocorking 2022-03-01 14:25:12 +00:00
unix.h
xdp.h
xfrm.h xfrm: rework default policy structure 2022-03-18 07:23:12 +01:00