]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Jun 2023 10:27:00 +0000 (11:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Jun 2023 10:27:00 +0000 (11:27 +0100)
added patches:
netfilter-ctnetlink-support-offloaded-conntrack-entry-deletion.patch

queue-4.19/netfilter-ctnetlink-support-offloaded-conntrack-entry-deletion.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/netfilter-ctnetlink-support-offloaded-conntrack-entry-deletion.patch b/queue-4.19/netfilter-ctnetlink-support-offloaded-conntrack-entry-deletion.patch
new file mode 100644 (file)
index 0000000..4dc55c6
--- /dev/null
@@ -0,0 +1,57 @@
+From 9b7c68b3911aef84afa4cbfc31bce20f10570d51 Mon Sep 17 00:00:00 2001
+From: Paul Blakey <paulb@nvidia.com>
+Date: Wed, 22 Mar 2023 09:35:32 +0200
+Subject: netfilter: ctnetlink: Support offloaded conntrack entry deletion
+
+From: Paul Blakey <paulb@nvidia.com>
+
+commit 9b7c68b3911aef84afa4cbfc31bce20f10570d51 upstream.
+
+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>
+Cc: Demi Marie Obenour <demi@invisiblethingslab.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/netfilter/nf_conntrack_netlink.c |    8 --------
+ 1 file changed, 8 deletions(-)
+
+--- a/net/netfilter/nf_conntrack_netlink.c
++++ b/net/netfilter/nf_conntrack_netlink.c
+@@ -1216,9 +1216,6 @@ static const struct nla_policy ct_nla_po
+ 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);
+ }
+@@ -1280,11 +1277,6 @@ static int ctnetlink_del_conntrack(struc
+       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]);
index 1a7356082f17f5d0d143b941fe6f0bcbb9166d84..85059c0f5ae56cb0319435da1364d0a338e7a97c 100644 (file)
@@ -6,3 +6,4 @@ power-supply-bq24190-call-power_supply_changed-after.patch
 cdc_ncm-fix-the-build-warning.patch
 bluetooth-add-cmd-validity-checks-at-the-start-of-hci_sock_ioctl.patch
 ipv-4-6-raw-fix-output-xfrm-lookup-wrt-protocol.patch
+netfilter-ctnetlink-support-offloaded-conntrack-entry-deletion.patch