]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
netfilter: nf_tables: remove the genmask parameter
authortuqiang <tu.qiang35@zte.com.cn>
Mon, 25 Nov 2024 12:26:34 +0000 (20:26 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 5 Jan 2025 10:24:03 +0000 (11:24 +0100)
The genmask parameter is not used within the nf_tables_addchain function
 body. It should be removed to simplify the function parameter list.

Signed-off-by: tuqiang <tu.qiang35@zte.com.cn>
Signed-off-by: Jiang Kun <jiang.kun2@zte.com.cn>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_tables_api.c

index 0b9f1e8dfe49b8e15365e5a5a1fa8ef751ac9877..f7ca7165e66ee3a62d2d83b9d181a0c3870024a8 100644 (file)
@@ -2598,9 +2598,8 @@ int nft_chain_add(struct nft_table *table, struct nft_chain *chain)
 
 static u64 chain_id;
 
-static int nf_tables_addchain(struct nft_ctx *ctx, u8 family, u8 genmask,
-                             u8 policy, u32 flags,
-                             struct netlink_ext_ack *extack)
+static int nf_tables_addchain(struct nft_ctx *ctx, u8 family, u8 policy,
+                             u32 flags, struct netlink_ext_ack *extack)
 {
        const struct nlattr * const *nla = ctx->nla;
        struct nft_table *table = ctx->table;
@@ -3038,7 +3037,7 @@ static int nf_tables_newchain(struct sk_buff *skb, const struct nfnl_info *info,
                                          extack);
        }
 
-       return nf_tables_addchain(&ctx, family, genmask, policy, flags, extack);
+       return nf_tables_addchain(&ctx, family, policy, flags, extack);
 }
 
 static int nft_delchain_hook(struct nft_ctx *ctx,