]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
netfilter: nft_ct: allow to set ctnetlink event types of a connection
authorFlorian Westphal <fw@strlen.de>
Sat, 15 Apr 2017 17:26:10 +0000 (19:26 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 19 Apr 2017 15:55:16 +0000 (17:55 +0200)
commit694a0055f039bc1d73aba10606ea74e798d2d759
treed24ef0638fbfbf4dcda30f9fef205912fefc8442
parentab8bc7ed864b9c4f1fcb00a22bbe4e0f66ce8003
netfilter: nft_ct: allow to set ctnetlink event types of a connection

By default the kernel emits all ctnetlink events for a connection.
This allows to select the types of events to generate.

This can be used to e.g. only send DESTROY events but no NEW/UPDATE ones
and will work even if sysctl net.netfilter.nf_conntrack_events is set to 0.

This was already possible via iptables' CT target, but the nft version has
the advantage that it can also be used with already-established conntracks.

The added nf_ct_is_template() check isn't a bug fix as we only support
mark and labels (and unlike ecache the conntrack core doesn't copy those).

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/uapi/linux/netfilter/nf_tables.h
net/netfilter/nft_ct.c