summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2019-12-13 16:53:06 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-24 08:34:42 +0100
commitc6a5ba48c87425dfb861b1150b169a82cddd3091 (patch)
treea0559896a846ab3f7d8524da593febf68496d2e8 /net
parent8a3bc6e31b2b40f5c8f20ba355c34203ea21abd0 (diff)
downloadlinux-c6a5ba48c87425dfb861b1150b169a82cddd3091.tar.gz
linux-c6a5ba48c87425dfb861b1150b169a82cddd3091.tar.bz2
linux-c6a5ba48c87425dfb861b1150b169a82cddd3091.zip
netfilter: nft_tunnel: add the missing ERSPAN_VERSION nla_policy
[ Upstream commit 0705f95c332081036d85f26691e9d3cd7d901c31 ] ERSPAN_VERSION is an attribute parsed in kernel side, nla_policy type should be added for it, like other attributes. Fixes: af308b94a2a4 ("netfilter: nf_tables: add tunnel support") Signed-off-by: Xin Long <lucien.xin@gmail.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
-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 e5444f3ff43f..5e66042ac346 100644
--- a/net/netfilter/nft_tunnel.c
+++ b/net/netfilter/nft_tunnel.c
@@ -218,8 +218,9 @@ static int nft_tunnel_obj_vxlan_init(const struct nlattr *attr,
}
static const struct nla_policy nft_tunnel_opts_erspan_policy[NFTA_TUNNEL_KEY_ERSPAN_MAX + 1] = {
+ [NFTA_TUNNEL_KEY_ERSPAN_VERSION] = { .type = NLA_U32 },
[NFTA_TUNNEL_KEY_ERSPAN_V1_INDEX] = { .type = NLA_U32 },
- [NFTA_TUNNEL_KEY_ERSPAN_V2_DIR] = { .type = NLA_U8 },
+ [NFTA_TUNNEL_KEY_ERSPAN_V2_DIR] = { .type = NLA_U8 },
[NFTA_TUNNEL_KEY_ERSPAN_V2_HWID] = { .type = NLA_U8 },
};