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  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]
Date:	Wed, 29 Oct 2014 20:26:42 -0700
Cc:	"H.K. Jerry Chu" <>,
	Eric Dumazet <>,
	Alexander Duyck <>,
	Neal Cardwell <>,
	Pravin B Shelar <>
Subject: [PATCH net] gre: Fix regression in gretap TSO support

From: Alexander Duyck <>

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 <>
Cc: Eric Dumazet <>
Cc: H.K. Jerry Chu <>
Cc: Pravin B Shelar <>
Signed-off-by: Alexander Duyck <>
 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
More majordomo info at

Powered by blists - more mailing lists