]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm6: Fix IPv6 payload_len in xfrm6_transport_finish
authorYossi Kuperman <yossiku@mellanox.com>
Thu, 22 Jun 2017 08:37:10 +0000 (11:37 +0300)
committerSteffen Klassert <steffen.klassert@secunet.com>
Thu, 22 Jun 2017 08:49:14 +0000 (10:49 +0200)
commitad05088ac81afc556271d48b8eacfe13555ffef9
tree7f7023cf174ea4739b7195e641bdaead99e66f8a
parentc85de521e95da3f87950bb732cef43d32c62daf1
xfrm6: Fix IPv6 payload_len in xfrm6_transport_finish

IPv6 payload length indicates the size of the payload, including any
extension headers.

In xfrm6_transport_finish, ipv6_hdr(skb)->payload_len is set to the
payload size only, regardless of the presence of any extension headers.
After ESP GRO transport mode decapsulation, ipv6_rcv trims the packet
according to the wrong payload_len, thus corrupting the packet.

Set payload_len to account for extension headers as well.

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/xfrm6_input.c