net/sched: act_tunnel_key: fix OOB write in case of IPv6 ERSPAN tunnels
[linux-2.6-microblaze.git] / net / sched / act_tunnel_key.c
index a229751..85c0d0d 100644 (file)
@@ -459,7 +459,7 @@ static int tunnel_key_init(struct net *net, struct nlattr *nla,
 
                        metadata = __ipv6_tun_set_dst(&saddr, &daddr, tos, ttl, dst_port,
                                                      0, flags,
-                                                     key_id, 0);
+                                                     key_id, opts_len);
                } else {
                        NL_SET_ERR_MSG(extack, "Missing either ipv4 or ipv6 src and dst");
                        ret = -EINVAL;