1
0
Fork 0

netfilter: nft_tunnel: ERSPAN_VERSION must not be null

Fixes: af308b94a2 ("netfilter: nf_tables: add tunnel support")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
alistair/sunxi64-5.5-dsi
Florian Westphal 2020-01-16 08:58:05 +01:00 committed by Pablo Neira Ayuso
parent 1c702bf902
commit 9ec22d7c6c
1 changed files with 3 additions and 0 deletions

View File

@ -266,6 +266,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: