Message ID | 1520609682-101077-4-git-send-email-u9012063@gmail.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
Series | a couple of erspan fixes | expand |
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c index 4ab476d3a46e..9a759bbbd8a6 100644 --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c @@ -906,6 +906,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;
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> --- net/ipv6/ip6_gre.c | 3 +++ 1 file changed, 3 insertions(+)