lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141030032430.4452.46388.stgit@ahduyck-workstation.home>
Date:	Wed, 29 Oct 2014 20:26:42 -0700
From:	alexander.duyck@...il.com
To:	netdev@...r.kernel.org, davem@...emloft.net
Cc:	"H.K. Jerry Chu" <hkchu@...gle.com>,
	Eric Dumazet <edumazet@...gle.com>,
	Alexander Duyck <alexander.h.duyck@...hat.com>,
	Neal Cardwell <ncardwell@...gle.com>,
	Pravin B Shelar <pshelar@...ira.com>
Subject: [PATCH net] gre: Fix regression in gretap TSO support

From: Alexander Duyck <alexander.h.duyck@...hat.com>

On recent kernels I found that TSO on gretap interfaces didn't work.  After
bisecting it I found that commit b884b1a4 had introduced a regression in
which the Ethernet header was being included in the GRE header length.

This change corrects that by basing the GRE header length on the inner mac
header in the case of GRE tunnels using transparent Ethernet bridging, and
uses the network header for all other GRE tunnel types.

Fixes: b884b1a4 ("gre_offload: simplify GRE header length calculation in gre_gso_segment()")
Cc: Neal Cardwell <ncardwell@...gle.com>
Cc: Eric Dumazet <edumazet@...gle.com>
Cc: H.K. Jerry Chu <hkchu@...gle.com>
Cc: Pravin B Shelar <pshelar@...ira.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@...hat.com>
---
 net/ipv4/gre_offload.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/ipv4/gre_offload.c b/net/ipv4/gre_offload.c
index f6e345c..67a1f66 100644
--- a/net/ipv4/gre_offload.c
+++ b/net/ipv4/gre_offload.c
@@ -47,7 +47,10 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb,
 
 	greh = (struct gre_base_hdr *)skb_transport_header(skb);
 
-	ghl = skb_inner_network_header(skb) - skb_transport_header(skb);
+	if (greh->protocol == htons(ETH_P_TEB))
+		ghl = skb_inner_mac_header(skb) - skb_transport_header(skb);
+	else
+		ghl = skb_inner_network_header(skb) - skb_transport_header(skb);
 	if (unlikely(ghl < sizeof(*greh)))
 		goto out;
 

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ