Skip to content

Commit

Permalink
netfilter: nf_tables: remove the genmask parameter
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
tuqiang authored and Pablo Neira Ayuso committed Jan 5, 2025
1 parent 3e59081 commit da0a090
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions net/netfilter/nf_tables_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit da0a090

Please sign in to comment.