From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796380625; b=GXqxJiUfw8VT8LfjpC+68F2g2MeygjhHMZuWNVpotRSISzfs+c94VdAyLSYE1nQMrgXF i8xYiO0pxAXAL2GBSfBCtjxqtMjgbXd4Uyh5EoragkbfCUWaH94uTVstO641GpW5Hf9c2 Shy6HJIwvYGfenZAvHR2C/hbXaazl6+U/wd8vpLCQ86chJzrk0ysYzhnGvN88b/IxpfUf pvEe17qMzQAo1+CZeoJiF8E6kuQaH8VBNZaNMpAAySpOWgEwZi6HzaK0hRlJq2iVgScOD u+0eh/7fjsWNIL8c1jHVQdOCPPcPOTUE3u3DTmNa8mqgXm/PJA+jrK9LZQpuarXpezQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380625; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=gXREE0nCWblj5+TcDiWqDKk/MMW2Gk5JzkIkhimopPo=; b=QbgwejY0Oxyl0tBRIUswWFPvgCTGUK5jvs3EYtV/F40yNDRw+AS2Q0gr2zwGjjJtgnGh otWAHhZMaGS0fXcRKmeQ0vU/ZtK5pJyJSXGYank1yRJbJXEcp7pO96RaZT0AnavlPZi0+ 8VRnWnw5ryfZcFZvsgwdMOZP/ZazimsUPpCbUkqR0gQwMCntAUTeNh0C8l/TpTV5kTRHn M+f9plZj68PSFKBfKTuC6XIk7L4Xq0tV3u+z1uFh5HjAQ5FQy5Hw5X5idxw3ZqCHVWJW2 mHeEU6jtSCzmuOYd3oSKAyTn80Xt2amchme5zIqWInveLsfPE1dw15aynjMG+q5Amug== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b="UrkapRq/"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 27EAB606A68B; Fri, 4 Dec 2026 10:37:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=UrkapRq/ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8BA0D1F000C2; Fri, 4 Dec 2026 10:37:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796380625; bh=gXREE0nCWblj5+TcDiWqDKk/MMW2Gk5JzkIkhimopPo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=UrkapRq/JKHlu6/lgbzoxT3Ofebzgonx8OVaSbZk8in/itXkrdWvn2JvvWFKYUGgU 2rntSMbfwgK5hdH+/Q22Hy9NNqwRWgm67ZexhhWydfHXveCEmG8419gJZFKn6ELKXT T9wnUPLFwEEFrqy1qIPZQ3QTKV3NldrzukC6g1Wg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Florian Fainelli , Paolo Abeni , Sasha Levin Subject: [PATCH 7.3 313/742] net: dsa: tag_brcm: fix link-local detection with a prepended tag Date: Fri, 4 Dec 2026 19:02:57 +0900 Message-ID: <20261204100643.346428416@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Florian Fainelli [ Upstream commit ae8e5ef9fa9eeaf4ee0a9a9bde0fc63023d9b154 ] brcm_tag_rcv_ll() checks eth_hdr(skb)->h_dest to avoid marking link-local frames as forwarded by the switch. With a prepended tag, eth_type_trans() sets the MAC header at the start of the tag, so the address checked is the tag plus the first two bytes of the real destination address. Link-local frames such as BPDUs, LLDP or EAPOL are then not recognized and get skb->offload_fwd_mark set, which keeps the bridge from forwarding them in software to the other ports of the switch when it is configured to do so. Read the destination address after the tag instead when the tag is prepended. Tags embedded after the source address are not affected. Fixes: 762e7e174da9 ("net: dsa: tag_brcm: do not mark link local traffic as offloaded") Signed-off-by: Florian Fainelli Link: https://patch.msgid.link/20261118184004.1916105-1-florian.fainelli@broadcom.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- net/dsa/tag_brcm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net/dsa/tag_brcm.c b/net/dsa/tag_brcm.c index b7c49822ca888..b58669c921474 100644 --- a/net/dsa/tag_brcm.c +++ b/net/dsa/tag_brcm.c @@ -149,6 +149,7 @@ static struct sk_buff *brcm_tag_rcv_ll(struct sk_buff *skb, unsigned int offset) { int source_port; + const u8 *dest; u8 *brcm_tag; if (unlikely(!pskb_may_pull(skb, BRCM_TAG_LEN))) { @@ -184,7 +185,11 @@ static struct sk_buff *brcm_tag_rcv_ll(struct sk_buff *skb, /* Remove Broadcom tag and update checksum */ skb_pull_rcsum(skb, BRCM_TAG_LEN); - if (likely(!is_link_local_ether_addr(eth_hdr(skb)->h_dest))) + /* With a prepended tag, the MAC header set by eth_type_trans() starts + * at the tag, and the destination address follows it. + */ + dest = offset == ETH_HLEN ? brcm_tag + BRCM_TAG_LEN : eth_hdr(skb)->h_dest; + if (likely(!is_link_local_ether_addr(dest))) dsa_default_offload_fwd_mark(skb); return skb; -- 2.53.0