Commit 483f3fdc authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso

netfilter: nft_tunnel: fix sparse errors

[...]
net/netfilter/nft_tunnel.c:117:25:    expected unsigned int [unsigned] [usertype] flags
net/netfilter/nft_tunnel.c:117:25:    got restricted __be16 [usertype] <noident>
[...]
net/netfilter/nft_tunnel.c:246:33:    expected restricted __be16 [addressable] [assigned] [usertype] tp_dst
net/netfilter/nft_tunnel.c:246:33:    got int

Fixes: af308b94 ("netfilter: nf_tables: add tunnel support")
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 020f6cc5
...@@ -116,7 +116,7 @@ struct nft_tunnel_opts { ...@@ -116,7 +116,7 @@ struct nft_tunnel_opts {
struct erspan_metadata erspan; struct erspan_metadata erspan;
} u; } u;
u32 len; u32 len;
u32 flags; __be16 flags;
}; };
struct nft_tunnel_obj { struct nft_tunnel_obj {
...@@ -337,12 +337,10 @@ static int nft_tunnel_obj_init(const struct nft_ctx *ctx, ...@@ -337,12 +337,10 @@ static int nft_tunnel_obj_init(const struct nft_ctx *ctx,
} }
if (tb[NFTA_TUNNEL_KEY_SPORT]) { if (tb[NFTA_TUNNEL_KEY_SPORT]) {
info.key.tp_src = info.key.tp_src = nla_get_be16(tb[NFTA_TUNNEL_KEY_SPORT]);
ntohs(nla_get_be16(tb[NFTA_TUNNEL_KEY_SPORT]));
} }
if (tb[NFTA_TUNNEL_KEY_DPORT]) { if (tb[NFTA_TUNNEL_KEY_DPORT]) {
info.key.tp_dst = info.key.tp_dst = nla_get_be16(tb[NFTA_TUNNEL_KEY_DPORT]);
ntohs(nla_get_be16(tb[NFTA_TUNNEL_KEY_DPORT]));
} }
if (tb[NFTA_TUNNEL_KEY_FLAGS]) { if (tb[NFTA_TUNNEL_KEY_FLAGS]) {
......
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