[PATCH 3.16.y-ckt 159/168] gre: Set inner mac header in gro complete

From: Luis Henriques
Date: Mon Dec 15 2014 - 09:33:50 EST

3.16.7-ckt3 -stable review patch. If anyone has any objections, please let me know.


From: Tom Herbert <therbert@xxxxxxxxxx>

commit 6fb2a756739aa507c1fd5b8126f0bfc2f070dc46 upstream.

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

Fixes: 14051f0452a2 ("gre: Use inner mac length when computing tunnel length")
Reported-by: Wolfgang Walter <linux@xxxxxxx>
Signed-off-by: Tom Herbert <therbert@xxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Luis Henriques <luis.henriques@xxxxxxxxxxxxx>
net/ipv4/gre_offload.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/net/ipv4/gre_offload.c b/net/ipv4/gre_offload.c
index 32041ecbeafb..4ae6b52751e9 100644
--- a/net/ipv4/gre_offload.c
+++ b/net/ipv4/gre_offload.c
@@ -279,6 +279,9 @@ static int gre_gro_complete(struct sk_buff *skb, int nhoff)
err = ptype->callbacks.gro_complete(skb, nhoff + grehlen);

+ skb_set_inner_mac_header(skb, nhoff + grehlen);
return err;


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/