]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
esp6_offload: Fix IP6CB(skb)->nhoff for ESP GRO
authorYossi Kuperman <yossiku@mellanox.com>
Thu, 22 Jun 2017 08:37:11 +0000 (11:37 +0300)
committerSteffen Klassert <steffen.klassert@secunet.com>
Thu, 22 Jun 2017 08:49:14 +0000 (10:49 +0200)
commitca3a1b856636f596c691ab5b3764045a142186db
tree6ecc68f96e04439fb9588a0b5dc73986b308ceb6
parent7c88e21aefcf86fb41b48b2e04528db5a30fbe18
esp6_offload: Fix IP6CB(skb)->nhoff for ESP GRO

IP6CB(skb)->nhoff is the offset of the nexthdr field in an IPv6
header, unless there are extension headers present, in which case
nhoff points to the nexthdr field of the last extension header.

In non-GRO code path, nhoff is set by ipv6_rcv before any XFRM code
is executed. Conversely, in GRO code path (when esp6_offload is loaded),
nhoff is not set. The following functions fail to read the correct value
and eventually the packet is dropped:

    xfrm6_transport_finish
    xfrm6_tunnel_input
    xfrm6_rcv_tnl

Set nhoff to the proper offset of nexthdr in esp6_gro_receive.

Fixes: 7785bba299a8 ("esp: Add a software GRO codepath")
Signed-off-by: Yossi Kuperman <yossiku@mellanox.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/ipv6/esp6_offload.c