All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nf] netfilter: nft_tunnel: ERSPAN_VERSION must not be null
@ 2020-01-16  7:58 Florian Westphal
  2020-01-16 14:00 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Westphal @ 2020-01-16  7:58 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Florian Westphal

Fixes: af308b94a2a4a5 ("netfilter: nf_tables: add tunnel support")
Signed-off-by: Florian Westphal <fw@strlen.de>
---

diff --git a/net/netfilter/nft_tunnel.c b/net/netfilter/nft_tunnel.c
index d89c7c553030..5284fcf16be7 100644
--- a/net/netfilter/nft_tunnel.c
+++ b/net/netfilter/nft_tunnel.c
@@ -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:
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH nf] netfilter: nft_tunnel: ERSPAN_VERSION must not be null
  2020-01-16  7:58 [PATCH nf] netfilter: nft_tunnel: ERSPAN_VERSION must not be null Florian Westphal
@ 2020-01-16 14:00 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2020-01-16 14:00 UTC (permalink / raw)
  To: Florian Westphal; +Cc: netfilter-devel

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-16 14:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-16  7:58 [PATCH nf] netfilter: nft_tunnel: ERSPAN_VERSION must not be null Florian Westphal
2020-01-16 14:00 ` Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.