Commit 21a9e0f1 authored by Dan Carpenter's avatar Dan Carpenter Committed by Pablo Neira Ayuso

netfilter: nft_exthdr: fix error handling in nft_exthdr_init()

"err" needs to be signed for the error handling to work.

Fixes: 36b701fa ('netfilter: nf_tables: validate maximum value of u32 netlink attributes')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 09525a09
...@@ -59,7 +59,8 @@ static int nft_exthdr_init(const struct nft_ctx *ctx, ...@@ -59,7 +59,8 @@ static int nft_exthdr_init(const struct nft_ctx *ctx,
const struct nlattr * const tb[]) const struct nlattr * const tb[])
{ {
struct nft_exthdr *priv = nft_expr_priv(expr); struct nft_exthdr *priv = nft_expr_priv(expr);
u32 offset, len, err; u32 offset, len;
int err;
if (tb[NFTA_EXTHDR_DREG] == NULL || if (tb[NFTA_EXTHDR_DREG] == NULL ||
tb[NFTA_EXTHDR_TYPE] == NULL || tb[NFTA_EXTHDR_TYPE] == NULL ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment