]> 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)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 14 Jul 2022 08:15:15 +0000 (10:15 +0200)
commit5b21bdbacfefd63f793ba057df5967cf909b9678
treee505ae2576c15e45893c0b0b09af015db454806a
parenta3e7e9dc5a76c97311a8288062caf7b8f2d5495e
seg6: fix skb checksum in SRv6 End.B6 and End.B6.Encaps behaviors

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: 4afe673f2e87 ("ipv6: sr: implement several seg6local actions")
Signed-off-by: Andrea Mayer <andrea.mayer@uniroma2.it>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/ipv6/seg6_local.c