mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 06:25:52 +02:00
netfilter: nft_tunnel: ERSPAN_VERSION must not be null
[ Upstream commit9ec22d7c6c] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
ffd89a6c2d
commit
9f19727f16
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user