]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
netfilter: nf_tables: rename function to destroy hook list
authorPablo Neira Ayuso <pablo@netfilter.org>
Thu, 20 Apr 2023 22:34:30 +0000 (00:34 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 9 Aug 2023 09:37:44 +0000 (11:37 +0200)
BugLink: https://bugs.launchpad.net/bugs/2028580
[ Upstream commit cdc32546632354305afdcf399a5431138a31c9e0 ]

Rename nft_flowtable_hooks_destroy() by nft_hooks_destroy() to prepare
for netdev chain device updates.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Stable-dep-of: 8509f62b0b07 ("netfilter: nf_tables: hit ENOENT on unexisting chain/flowtable update with missing attributes")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
net/netfilter/nf_tables_api.c

index 4ceb1c296ffc7ecdc77198c85bddd03d0c73d8de..eefeb03c7ab06fe64480d09f5753800a86e2513c 100644 (file)
@@ -7742,7 +7742,7 @@ err_unregister_net_hooks:
        return err;
 }
 
-static void nft_flowtable_hooks_destroy(struct list_head *hook_list)
+static void nft_hooks_destroy(struct list_head *hook_list)
 {
        struct nft_hook *hook, *next;
 
@@ -7923,7 +7923,7 @@ static int nf_tables_newflowtable(struct sk_buff *skb,
                                               &flowtable->hook_list,
                                               flowtable);
        if (err < 0) {
-               nft_flowtable_hooks_destroy(&flowtable->hook_list);
+               nft_hooks_destroy(&flowtable->hook_list);
                goto err4;
        }
 
@@ -8698,7 +8698,7 @@ static void nft_commit_release(struct nft_trans *trans)
                break;
        case NFT_MSG_DELFLOWTABLE:
                if (nft_trans_flowtable_update(trans))
-                       nft_flowtable_hooks_destroy(&nft_trans_flowtable_hooks(trans));
+                       nft_hooks_destroy(&nft_trans_flowtable_hooks(trans));
                else
                        nf_tables_flowtable_destroy(nft_trans_flowtable(trans));
                break;
@@ -9344,7 +9344,7 @@ static void nf_tables_abort_release(struct nft_trans *trans)
                break;
        case NFT_MSG_NEWFLOWTABLE:
                if (nft_trans_flowtable_update(trans))
-                       nft_flowtable_hooks_destroy(&nft_trans_flowtable_hooks(trans));
+                       nft_hooks_destroy(&nft_trans_flowtable_hooks(trans));
                else
                        nf_tables_flowtable_destroy(nft_trans_flowtable(trans));
                break;