[ovs-dev] [PATCH V3 35/40] ip6erspan: make sure enough headroom at xmit.
Greg Rose
gvrose8192 at gmail.com
Sat May 19 00:49:43 UTC 2018
From: William Tu <u9012063 at gmail.com>
Upstream commit:
commit e41c7c68ea771683cae5a7f81c268f38d7912ecb
Author: William Tu <u9012063 at gmail.com>
Date: Fri Mar 9 07:34:42 2018 -0800
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 at gmail.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Cc: William Tu <u9012063 at gmail.com>
Signed-off-by: Greg Rose <gvrose8192 at gmail.com>
---
datapath/linux/compat/ip6_gre.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/datapath/linux/compat/ip6_gre.c b/datapath/linux/compat/ip6_gre.c
index 25f24e3..c9bd80d 100644
--- a/datapath/linux/compat/ip6_gre.c
+++ b/datapath/linux/compat/ip6_gre.c
@@ -1094,6 +1094,9 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb,
(ntohs(ip_hdr(skb)->tot_len) > skb->len - nhoff))
truncate = true;
+ if (skb_cow_head(skb, dev->needed_headroom))
+ goto tx_err;
+
t->parms.o_flags &= ~TUNNEL_KEY;
IPCB(skb)->flags = 0;
--
1.8.3.1
More information about the dev
mailing list