]> git.baikalelectronics.ru Git - kernel.git/commit
seg6: fix skb checksum in SRv6 End.B6 and End.B6.Encaps behaviors
authorAndrea Mayer <andrea.mayer@uniroma2.it>
Tue, 12 Jul 2022 17:58:36 +0000 (19:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Jul 2022 18:59:23 +0000 (20:59 +0200)
commitaeff1f60b036b700d65c1a3d57b0b8ba610984fb
treeb19e0539bcc09d296bfa98a957f615e783b13f16
parent1ac98d656c286ab6b3edfd2985a4ca4171742c5d
seg6: fix skb checksum in SRv6 End.B6 and End.B6.Encaps behaviors

[ Upstream commit 69a6681673170593253a16c8e3d8cbf7a89e9873 ]

The SRv6 End.B6 and End.B6.Encaps behaviors rely on functions
seg6_do_srh_{encap,inline}() to, respectively: i) encapsulate the
packet within an outer IPv6 header with the specified Segment Routing
Header (SRH); ii) insert the specified SRH directly after the IPv6
header of the packet.

This patch removes the initialization of the IPv6 header payload length
from the input_action_end_b6{_encap}() functions, as it is now handled
properly by seg6_do_srh_{encap,inline}() to avoid corruption of the skb
checksum.

Fixes: 4cc770315629 ("ipv6: sr: implement several seg6local actions")
Signed-off-by: Andrea Mayer <andrea.mayer@uniroma2.it>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv6/seg6_local.c