From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 617143DE43B; Mon, 4 May 2026 14:17:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777904257; cv=none; b=q+3CEtSWfwV6zgznkDMVaTHsZ17/AHe1njae+kYqhGrHJAu/iuTzWABWcPSM6OnzjijpNhM9miu3upPHKaSI/ap8mEjCGQyTEtyoFKU6iW0GCdmDB3OTCQWjQq3PhEIJcBX0naza9eJ5zS+eoBhO33nx7f4JbXBWLYXgeNzyc4I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777904257; c=relaxed/simple; bh=CiT4XqyGKNa2cz0nI6DnytUXowrpQgtXFwzqR0CbCfQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JSlPavRzfxDhPUV0M25JFFsaBjB7DI3e1lQdbmFxHYYZ1tAO816PKt8dpWxeL8hUWf3lWAQrwhbDL6PPboMZkDy990GN0upneCUxxo+68Njx3DdgtImvTBdCOmohliWF4lUw3vmJyD7w0dmPqZ3Ow/G/Uc4eOhS/bgFjd2mj+gY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=IXBJaUty; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="IXBJaUty" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD13BC2BCB8; Mon, 4 May 2026 14:17:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1777904257; bh=CiT4XqyGKNa2cz0nI6DnytUXowrpQgtXFwzqR0CbCfQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IXBJaUtySiSVxeWAvYIwHEdER77vPQzjp6V83/3nnt8w+4CO+4pwLfe19Kcm4c9oE 3MOF7LifouhnfvAlofhRLfbGimTlIafeqrwQRcVlWVIQIrJ9gedRn7ZrbMosSWhF9Y OHxtfN/e9e7LJAawFlAlnGQWAutWEQdG7uHE1r3E= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Andrea Mayer , Justin Iurman , Jakub Kicinski Subject: [PATCH 6.18 245/275] seg6: fix seg6 lwtunnel output redirect for L2 reduced encap mode Date: Mon, 4 May 2026 15:53:05 +0200 Message-ID: <20260504135152.141834041@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260504135142.929052779@linuxfoundation.org> References: <20260504135142.929052779@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andrea Mayer commit ade67d5f588832c7ba131aadd4215a94ce0a15c8 upstream. 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 Reviewed-by: Justin Iurman Link: https://patch.msgid.link/20260418162838.31979-1-andrea.mayer@uniroma2.it Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/ipv6/seg6_iptunnel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/net/ipv6/seg6_iptunnel.c +++ b/net/ipv6/seg6_iptunnel.c @@ -715,7 +715,8 @@ static int seg6_build_state(struct net * 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);