]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
seg6: add support for SRv6 H.Encaps.Red behavior
authorAndrea Mayer <andrea.mayer@uniroma2.it>
Wed, 27 Jul 2022 18:54:05 +0000 (20:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:50:57 +0000 (12:50 +0100)
commit86df97f030be3c4702843aa0c9cef41c05bc6808
tree5807d4ac0b362306ad2b873ebeb9b22d3b445aae
parentbf5801cc24cc578985c29b7d85d27bcdab895fbb
seg6: add support for SRv6 H.Encaps.Red behavior

[ Upstream commit b07c8cdbe918aa17da864da9a89b22afaed0393e ]

The SRv6 H.Encaps.Red behavior described in [1] is an optimization of
the SRv6 H.Encaps behavior [2].

H.Encaps.Red reduces the length of the SRH by excluding the first
segment (SID) in the SRH of the pushed IPv6 header. The first SID is
only placed in the IPv6 Destination Address field of the pushed IPv6
header.
When the SRv6 Policy only contains one SID the SRH is omitted, unless
there is an HMAC TLV to be carried.

[1] - https://datatracker.ietf.org/doc/html/rfc8986#section-5.2
[2] - https://datatracker.ietf.org/doc/html/rfc8986#section-5.1

Signed-off-by: Andrea Mayer <andrea.mayer@uniroma2.it>
Signed-off-by: Anton Makarov <anton.makarov11235@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: c64a0727f9b1 ("net: ipv6: fix dst ref loop on input in seg6 lwt")
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/uapi/linux/seg6_iptunnel.h
net/ipv6/seg6_iptunnel.c