]> 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)
commit6cbdc316d5261a3a15e083eb2f55c1237a3a0a28
tree6ecc68f96e04439fb9588a0b5dc73986b308ceb6
parentb064aefcb3d4d497298700bf2b86814c9bc5a994
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: ecaae2a271dc ("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