From: Justin Iurman <justin.iurman@uliege.be>
To: Andrea Mayer <andrea.mayer@uniroma2.it>,
davem@davemloft.net, dsahern@kernel.org, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org
Cc: anton.makarov11235@gmail.com, stefano.salsano@uniroma2.it,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH net] seg6: fix seg6 lwtunnel output redirect for L2 reduced encap mode
Date: Tue, 21 Apr 2026 19:50:28 +0200 [thread overview]
Message-ID: <d2a0a7ac-09bc-4773-b106-a4cfa62ec06e@uliege.be> (raw)
In-Reply-To: <20260418162838.31979-1-andrea.mayer@uniroma2.it>
On 4/18/26 18:28, Andrea Mayer wrote:
> When SEG6_IPTUN_MODE_L2ENCAP_RED (L2ENCAP_RED) was introduced, the
> condition in seg6_build_state() that excludes L2 encap modes from
> setting LWTUNNEL_STATE_OUTPUT_REDIRECT was not updated to account for
> the new mode.
> As a consequence, L2ENCAP_RED routes incorrectly trigger seg6_output()
> on the output path, where the packet is silently dropped because
> skb_mac_header_was_set() fails on L3 packets.
>
> Extend the check to also exclude L2ENCAP_RED, consistent with L2ENCAP.
>
> Fixes: 13f0296be8ec ("seg6: add support for SRv6 H.L2Encaps.Red behavior")
> Cc: stable@vger.kernel.org
> Signed-off-by: Andrea Mayer <andrea.mayer@uniroma2.it>
> ---
> net/ipv6/seg6_iptunnel.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/ipv6/seg6_iptunnel.c b/net/ipv6/seg6_iptunnel.c
> index 97b50d9b1365..9b64343ebad6 100644
> --- a/net/ipv6/seg6_iptunnel.c
> +++ b/net/ipv6/seg6_iptunnel.c
> @@ -746,7 +746,8 @@ static int seg6_build_state(struct net *net, struct nlattr *nla,
> newts->type = LWTUNNEL_ENCAP_SEG6;
> newts->flags |= LWTUNNEL_STATE_INPUT_REDIRECT;
>
> - if (tuninfo->mode != SEG6_IPTUN_MODE_L2ENCAP)
> + if (tuninfo->mode != SEG6_IPTUN_MODE_L2ENCAP &&
> + tuninfo->mode != SEG6_IPTUN_MODE_L2ENCAP_RED)
> newts->flags |= LWTUNNEL_STATE_OUTPUT_REDIRECT;
>
> newts->headroom = seg6_lwt_headroom(tuninfo);
Reviewed-by: Justin Iurman <justin.iurman@gmail.com>
next prev parent reply other threads:[~2026-04-21 17:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-18 16:28 [PATCH net] seg6: fix seg6 lwtunnel output redirect for L2 reduced encap mode Andrea Mayer
2026-04-21 17:50 ` Justin Iurman [this message]
2026-04-23 4:10 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d2a0a7ac-09bc-4773-b106-a4cfa62ec06e@uliege.be \
--to=justin.iurman@uliege.be \
--cc=andrea.mayer@uniroma2.it \
--cc=anton.makarov11235@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
--cc=stefano.salsano@uniroma2.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox