diff options
author | William Tu <u9012063@gmail.com> | 2018-03-09 07:34:42 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-09 13:03:57 -0500 |
commit | e41c7c68ea771683cae5a7f81c268f38d7912ecb (patch) | |
tree | 8746c5484cf7d7974183b3694f9f9376772faf86 /net/ipv6/ip6_gre.c | |
parent | d6aa71197ffcb68850bfebfc3fc160abe41df53b (diff) | |
download | linux-stable-e41c7c68ea771683cae5a7f81c268f38d7912ecb.tar.gz linux-stable-e41c7c68ea771683cae5a7f81c268f38d7912ecb.tar.bz2 linux-stable-e41c7c68ea771683cae5a7f81c268f38d7912ecb.zip |
ip6erspan: make sure enough headroom at xmit.
The patch adds skb_cow_header() to ensure enough headroom
at ip6erspan_tunnel_xmit before pushing the erspan header
to the skb.
Signed-off-by: William Tu <u9012063@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_gre.c')
-rw-r--r-- | net/ipv6/ip6_gre.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c index a299f5424e16..1bbd0930063e 100644 --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c @@ -903,6 +903,9 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb, truncate = true; } + if (skb_cow_head(skb, dev->needed_headroom)) + goto tx_err; + t->parms.o_flags &= ~TUNNEL_KEY; IPCB(skb)->flags = 0; |