Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754246AbcK1F1T (ORCPT ); Mon, 28 Nov 2016 00:27:19 -0500 Received: from cmccmta1.chinamobile.com ([221.176.66.79]:37053 "EHLO cmccmta1.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753748AbcK1F1O (ORCPT ); Mon, 28 Nov 2016 00:27:14 -0500 X-RM-TRANSID: 2ee2583bc02d763-ac9cc X-RM-SPAM-FLAG: 00000000 X-RM-TRANSID: 2ee7583bc02d9e4-96988 From: Haishuang Yan To: "David S. Miller" , Hannes Frederic Sowa , Alexander Duyck , Pravin B Shelar , Jiri Benc Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Haishuang Yan Subject: [PATCH] geneve: fix ip_hdr_len reserved for geneve6 tunnel. Date: Mon, 28 Nov 2016 13:26:58 +0800 Message-Id: <1480310818-78456-1-git-send-email-yanhaishuang@cmss.chinamobile.com> X-Mailer: git-send-email 2.5.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 783 Lines: 26 It shold reserved sizeof(ipv6hdr) for geneve in ipv6 tunnel. Fixes: c3ef5aa5e5 ('geneve: Merge ipv4 and ipv6 geneve_build_skb()') Signed-off-by: Haishuang Yan --- drivers/net/geneve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c index 7b80e28..45301cb 100644 --- a/drivers/net/geneve.c +++ b/drivers/net/geneve.c @@ -852,7 +852,7 @@ static int geneve6_xmit_skb(struct sk_buff *skb, struct net_device *dev, ip_hdr(skb), skb); ttl = key->ttl ? : ip6_dst_hoplimit(dst); } - err = geneve_build_skb(dst, skb, info, xnet, sizeof(struct iphdr)); + err = geneve_build_skb(dst, skb, info, xnet, sizeof(struct ipv6hdr)); if (unlikely(err)) return err; -- 1.8.3.1