summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorAntoine Tenart <atenart@kernel.org>2022-04-12 10:14:59 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2022-04-12 11:36:37 +0200
commit6c6f9f31ecd47dce1d0dafca4bec8805f9bc97cd (patch)
tree0d74dcbb3450376fd4b7831a296c643578625c7e /net
parent05ae2fba821c4d122ab4ba3e52144e21586c4010 (diff)
netfilter: nf_tables: nft_parse_register can return a negative value
Since commit 6e1acfa387b9 ("netfilter: nf_tables: validate registers coming from userspace.") nft_parse_register can return a negative value, but the function prototype is still returning an unsigned int. Fixes: 6e1acfa387b9 ("netfilter: nf_tables: validate registers coming from userspace.") Signed-off-by: Antoine Tenart <atenart@kernel.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_tables_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 128ee3b300d6..16c3a39689f4 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -9363,7 +9363,7 @@ int nft_parse_u32_check(const struct nlattr *attr, int max, u32 *dest)
}
EXPORT_SYMBOL_GPL(nft_parse_u32_check);
-static unsigned int nft_parse_register(const struct nlattr *attr, u32 *preg)
+static int nft_parse_register(const struct nlattr *attr, u32 *preg)
{
unsigned int reg;