netfilter: ctnetlink: Support offloaded conntrack entry deletion
authorPaul Blakey <paulb@nvidia.com>
Wed, 22 Mar 2023 07:35:32 +0000 (09:35 +0200)
committerFlorian Westphal <fw@strlen.de>
Thu, 30 Mar 2023 20:20:09 +0000 (22:20 +0200)
commit9b7c68b3911aef84afa4cbfc31bce20f10570d51
tree0b0c3672b0eab179bd1d9d1c8454dd4100fb978c
parenta25b8b7136ad43760bd876af62b6e59abd30496c
netfilter: ctnetlink: Support offloaded conntrack entry deletion

Currently, offloaded conntrack entries (flows) can only be deleted
after they are removed from offload, which is either by timeout,
tcp state change or tc ct rule deletion. This can cause issues for
users wishing to manually delete or flush existing entries.

Support deletion of offloaded conntrack entries.

Example usage:
 # Delete all offloaded (and non offloaded) conntrack entries
 # whose source address is 1.2.3.4
 $ conntrack -D -s 1.2.3.4
 # Delete all entries
 $ conntrack -F

Signed-off-by: Paul Blakey <paulb@nvidia.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
net/netfilter/nf_conntrack_netlink.c