[ovs-dev] gre: strip gre-tso offload flags

Message ID 1514435737-1861-1-git-send-email-wenxu@ucloud.cn
State Superseded
Headers show
  • [ovs-dev] gre: strip gre-tso offload flags
Related show

Commit Message

wenxu Dec. 28, 2017, 4:35 a.m.
From: wenxu <wenxu@ucloud.cn>

if the gro enable, ipgre receive a gre-tso package. After pop
the gre-tunnel the encapsulation and GSO_ENCAP flags should be
striped. or the packet encap again and will be dropped in

Signed-off-by: wenxu <wenxu@ucloud.cn>
 datapath/linux/compat/ip_gre.c | 2 ++
 1 file changed, 2 insertions(+)


diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c
index 03c5435..94fdaa9 100644
--- a/datapath/linux/compat/ip_gre.c
+++ b/datapath/linux/compat/ip_gre.c
@@ -140,6 +140,8 @@  static int ipgre_rcv(struct sk_buff *skb, const struct tnl_ptk_info *tpi)
 		__be64 tun_id;
 		int err;
+		if (iptunnel_pull_offloads(skb))
+			return PACKET_REJECT;
 		flags = tpi->flags & (TUNNEL_CSUM | TUNNEL_KEY);