netfilter: ctnetlink: Support offloaded conntrack entry deletion
Subsystems (3)
PATCH 1/1 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
--- net/netfilter/nf_conntrack_netlink.c | 8 -------- 1 file changed, 8 deletions(-)
net/netfilter/nf_conntrack_netlink.c +0 -8
@@ -1554,9 +1554,6 @@ static const struct nla_policy ct_nla_policy[CTA_MAX+1] = {static int ctnetlink_flush_iterate (struct nf_conn *ct,void *data) { -if (test_bit (IPS_OFFLOAD_BIT , &ct->status)) -return 0 ; -return ctnetlink_filter_match (ct, data); }
@@ -1626,11 +1623,6 @@ static int ctnetlink_del_conntrack(struct sk_buff *skb, ct =nf_ct_tuplehash_to_ctrack (h); -if (test_bit (IPS_OFFLOAD_BIT , &ct->status)) { -nf_ct_put (ct); -return -EBUSY ; - } -if (cda[CTA_ID ]) {__be32 id =nla_get_be32 (cda[CTA_ID ]);
Signature · 1 line
2.26.3
Jakub Kicinski
maintainerQuoted 2 lines · On Tue, 21 Mar 2023 15:50:04 +0200 Paul Blakey wrote:
To: Paul Blakey <[email protected]>, <[email protected]>, Saeed Mahameed <[email protected]>, Pablo Neira Ayuso <[email protected]>, "Jozsef Kadlecsik" <[email protected]>, Florian Westphal <[email protected]>, "David S. Miller" <[email protected]>, Eric Dumazet <[email protected]>, "Jakub Kicinski" <[email protected]>, Paolo Abeni <[email protected]>, <[email protected]>, <[email protected]>, <[email protected]>
CC: Oz Shlomo <[email protected]>, Roi Dayan <[email protected]>, Vlad Buslov <[email protected]>
Please put the maintainers you expect to take the patch on To:
And the rest of the people on CC:
Quoted 1 line
Subject: [PATCH net-next 1/1] netfilter: ctnetlink: Support offloaded conntrack entry deletion
git log --no-merges \ --format='%<(20)%cn %cs %<(47,trunc)%s' \ -- \ net/netfilter/nf_conntrack_netlink.c
clearly not net-next, we don't take patches to this file.