aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/nft_tunnel.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2022-06-23 15:05:13 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2022-07-11 16:40:46 +0200
commitffb3d9a30cc67a59865f50ae22e2496a5d0025eb (patch)
tree48eaf2da83e196d79a0a7ff1530681e5f48d7748 /net/netfilter/nft_tunnel.c
parent7278b3c1e4ebf6f9c4cda07600f19824857c81fe (diff)
downloadlinux-ffb3d9a30cc67a59865f50ae22e2496a5d0025eb.tar.gz
netfilter: nf_tables: use correct integer types
Sparse tool complains about mixing of different endianess types, so use the correct ones. Add type casts where needed. objdiff shows no changes except in nft_tunnel (type is changed). Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nft_tunnel.c')
-rw-r--r--net/netfilter/nft_tunnel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/netfilter/nft_tunnel.c b/net/netfilter/nft_tunnel.c
index d0f9b1d51b0e9d..5edaaded706d9c 100644
--- a/net/netfilter/nft_tunnel.c
+++ b/net/netfilter/nft_tunnel.c
@@ -383,8 +383,9 @@ static int nft_tunnel_obj_opts_init(const struct nft_ctx *ctx,
struct ip_tunnel_info *info,
struct nft_tunnel_opts *opts)
{
- int err, rem, type = 0;
struct nlattr *nla;
+ __be16 type = 0;
+ int err, rem;
err = nla_validate_nested_deprecated(attr, NFTA_TUNNEL_KEY_OPTS_MAX,
nft_tunnel_opts_policy, NULL);