Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e41c7c68 authored by William Tu's avatar William Tu Committed by David S. Miller
Browse files

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: default avatarWilliam Tu <u9012063@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d6aa7119
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;