summaryrefslogtreecommitdiff
path: root/net/ipv6/ip6_gre.c
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2019-11-12 13:57:30 +0100
committerStefan Agner <stefan.agner@toradex.com>2019-11-12 13:57:30 +0100
commit401bf3f29b1aa6d9ca32bd3252fc9beabe93d80b (patch)
tree6dd86325823a9b44b6e696acbd077e68c47d3108 /net/ipv6/ip6_gre.c
parent5a9c845fe261dec87f892f3fd3c2e32604d952c0 (diff)
parentb260a0862e3a9fccdac23ec3b783911b098c1c74 (diff)
Merge tag 'v5.3.10' into toradex_5.3.ytoradex_5.3.y
This is the 5.3.10 stable release
Diffstat (limited to 'net/ipv6/ip6_gre.c')
-rw-r--r--net/ipv6/ip6_gre.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index d5779d6a6065..4efc272c6027 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -980,9 +980,9 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb,
dsfield = key->tos;
if (!(tun_info->key.tun_flags & TUNNEL_ERSPAN_OPT))
goto tx_err;
- md = ip_tunnel_info_opts(tun_info);
- if (!md)
+ if (tun_info->options_len < sizeof(*md))
goto tx_err;
+ md = ip_tunnel_info_opts(tun_info);
tun_id = tunnel_id_to_key32(key->tun_id);
if (md->version == 1) {