Skip to contentSkip to conversation

gre: Set inner mac header in gro complete

PATCH In review Tom Herbert 3 participants 3 messages Nov 25, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gre: Set inner mac header in gro complete

Set the inner mac header to point to the GRE payload when doing GRO. This is needed if we proceed to send the packet through GRE GSO which now uses the inner mac header instead of inner network header to determine the length of encapsulation headers.

---
 net/ipv4/gre_offload.c | 3 +++
 1 file changed, 3 insertions(+)
net/ipv4/gre_offload.c +3 -0
index bb5947b..51973dd 100644
@@ -247,6 +247,9 @@ static int gre_gro_complete(struct sk_buff *skb, int nhoff)
 		err = ptype->callbacks.gro_complete(skb, nhoff + grehlen);
 
 	rcu_read_unlock();
+
+	skb_set_inner_mac_header(skb, nhoff + grehlen);
+
 	return err;
 }
 
Signature · 1 line
2.1.0.rc2.206.gedb03e5
#1 lore raw
Quoted 9 lines · Tom Herbert

Set the inner mac header to point to the GRE payload when doing GRO. This is needed if we proceed to send the packet through GRE GSO which now uses the inner mac header instead of inner network header to determine the length of encapsulation headers.

---

Please Tom, add in your bug fixes something to ease backports.

Fixes 14051f0452a2 ("gre: Use inner mac length when computing tunnel length")
maintainer
#2 lore raw

From: Eric Dumazet <[email protected]>
Date: Tue, 25 Nov 2014 09:57:21 -0800

Quoted 7 lines · Tom Herbert
Quoted 6 lines

Set the inner mac header to point to the GRE payload when doing GRO. This is needed if we proceed to send the packet through GRE GSO which now uses the inner mac header instead of inner network header to determine the length of encapsulation headers.

Quoted 7 lines
Quoted 3 lines

---

Please Tom, add in your bug fixes something to ease backports.

Fixes 14051f0452a2 ("gre: Use inner mac length when computing tunnel length")

Also this is extremely far reaching consequences.

The bug is in Linus's tree, so net-next is not a suitable target, 'net' is.

Also, the commit in question has been backported into -stable, so I would need to queue it up there as well.

Please respin this against 'net', and add the Fixes: tag, thanks.