]> git.baikalelectronics.ru Git - kernel.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)
commit5f133354f9d3e1319acd3219fbb5c7a196f2de86
tree6ecc68f96e04439fb9588a0b5dc73986b308ceb6
parentad05088ac81afc556271d48b8eacfe13555ffef9
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: d50c86b86f7c ("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