]> git.baikalelectronics.ru Git - kernel.git/commit
gre: fix the inner mac header in nbma tunnel xmit path
authorTimo Teräs <timo.teras@iki.fi>
Mon, 15 Dec 2014 07:24:13 +0000 (09:24 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Dec 2014 16:46:04 +0000 (11:46 -0500)
commite3f625cc50b4b35d7d09fffea488e06ed4f74c8f
treee3bbe120e1f16abf6c532dcd5ba33529a118f0c2
parente87d5218b49f033a7f47d29bd327718c6fdf0ca5
gre: fix the inner mac header in nbma tunnel xmit path

The NBMA GRE tunnels temporarily push GRE header that contain the
per-packet NBMA destination on the skb via header ops early in xmit
path. It is the later pulled before the real GRE header is constructed.

The inner mac was thus set differently in nbma case: the GRE header
has been pushed by neighbor layer, and mac header points to beginning
of the temporary gre header (set by dev_queue_xmit).

Now that the offloads expect mac header to point to the gre payload,
fix the xmit patch to:
 - pull first the temporary gre header away
 - and reset mac header to point to gre payload

This fixes tso to work again with nbma tunnels.

Fixes: e5e8ab1de705 ("gre: Use inner mac length when computing tunnel length")
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Cc: Tom Herbert <therbert@google.com>
Cc: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_gre.c