Skip to content

Commit e41c7c6

Browse files
williamtudavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d6aa711 commit e41c7c6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/ipv6/ip6_gre.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,9 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb,
903903
truncate = true;
904904
}
905905

906+
if (skb_cow_head(skb, dev->needed_headroom))
907+
goto tx_err;
908+
906909
t->parms.o_flags &= ~TUNNEL_KEY;
907910
IPCB(skb)->flags = 0;
908911

0 commit comments

Comments
 (0)