]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
esp: delete NETIF_F_SCTP_CRC bit from features for esp offload
authorXin Long <lucien.xin@gmail.com>
Fri, 19 Mar 2021 07:35:07 +0000 (15:35 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Apr 2021 06:47:17 +0000 (08:47 +0200)
commit7ccd73a4446b941a7fc09101b898f58d5e2b1186
tree9dd0c11edffac64ceeacda591e1e653043fceeab
parentfbc15e47cab7abb125d7a8298e03e094bc4d4240
esp: delete NETIF_F_SCTP_CRC bit from features for esp offload

[ Upstream commit 154deab6a3ba47792936edf77f2f13a1cbc4351d ]

Now in esp4/6_gso_segment(), before calling inner proto .gso_segment,
NETIF_F_CSUM_MASK bits are deleted, as HW won't be able to do the
csum for inner proto due to the packet encrypted already.

So the UDP/TCP packet has to do the checksum on its own .gso_segment.
But SCTP is using CRC checksum, and for that NETIF_F_SCTP_CRC should
be deleted to make SCTP do the csum in own .gso_segment as well.

In Xiumei's testing with SCTP over IPsec/veth, the packets are kept
dropping due to the wrong CRC checksum.

Reported-by: Xiumei Mu <xmu@redhat.com>
Fixes: 7862b4058b9f ("esp: Add gso handlers for esp4 and esp6")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/esp4_offload.c
net/ipv6/esp6_offload.c