Skip to content

Commit

Permalink
ip6erspan: make sure enough headroom at xmit.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
William Tu authored and David S. Miller committed Mar 9, 2018
1 parent d6aa711 commit e41c7c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/ipv6/ip6_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit e41c7c6

Please sign in to comment.