Commit 9f19727f authored by Florian Westphal's avatar Florian Westphal Committed by Greg Kroah-Hartman

netfilter: nft_tunnel: ERSPAN_VERSION must not be null

[ Upstream commit 9ec22d7c ]

Fixes: af308b94 ("netfilter: nf_tables: add tunnel support")
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent ffd89a6c
......@@ -235,6 +235,9 @@ static int nft_tunnel_obj_erspan_init(const struct nlattr *attr,
if (err < 0)
return err;
if (!tb[NFTA_TUNNEL_KEY_ERSPAN_VERSION])
return -EINVAL;
version = ntohl(nla_get_be32(tb[NFTA_TUNNEL_KEY_ERSPAN_VERSION]));
switch (version) {
case ERSPAN_VERSION:
......
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