Commit 435dcf66f0136e58e786ee81d69faecbb445b4d6

Authored by Tom Herbert
Committed by Greg Kroah-Hartman
1 parent 8407165b42

gre: Set inner mac header in gro complete

[ Upstream commit 6fb2a756739aa507c1fd5b8126f0bfc2f070dc46 ]

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff

net/ipv4/gre_offload.c
... ... @@ -247,6 +247,9 @@
247 247 err = ptype->callbacks.gro_complete(skb, nhoff + grehlen);
248 248  
249 249 rcu_read_unlock();
  250 +
  251 + skb_set_inner_mac_header(skb, nhoff + grehlen);
  252 +
250 253 return err;
251 254 }
252 255