summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorTom Herbert <therbert@google.com>2014-11-29 20:59:45 +0300
committerLuis Henriques <luis.henriques@canonical.com>2014-12-15 14:10:34 +0300
commit74bc70d51a3b56d81c6cb2c5cf545738435f711f (patch)
tree155f114f905565ff0a1b0f5e278dbf2373b3bc76 /net
parente219e662fa54df4679d45840d2e7f87ea73bc010 (diff)
downloadlinux-74bc70d51a3b56d81c6cb2c5cf545738435f711f.tar.xz
gre: Set inner mac header in gro complete
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 headers. Fixes: 14051f0452a2 ("gre: Use inner mac length when computing tunnel length") Reported-by: Wolfgang Walter <linux@stwm.de> Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/gre_offload.c3
1 files changed, 3 insertions, 0 deletions
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);
rcu_read_unlock();
+
+ skb_set_inner_mac_header(skb, nhoff + grehlen);
+
return err;
}