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 7317831578E; Fri, 21 Nov 2025 13:28:49 +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=1763731729; cv=none; b=AOJSQEeLsLNM1GKQFNtJUzqRhmLLN0Zj+LQ8PyH+qaUJd8h/tuy+Biw6VbLKHNoYH3BJJ7FfNq1TA12MbO2/qdyUxuxWZE/sOGY6KIPwZ2oiJjUtYmC1LIyFnbRM6sqB2Wc0UoCvU2gYe+UdSI0PrKwtwwe7VkiOVcQqK5LJJUk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763731729; c=relaxed/simple; bh=dbte+gbiRX63UeM5rcZAM7P/1jtVjR3FCW2NwUZBCvI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nTb47zWhFAJnCnaS/VHIZ7k3hxsrNw95IGoemCVhBv9jT4HhjD8PSprgb2MJZJP8PkgDx7+F7vv20ka7pWwEN+kIB7ThHCjo6AnbqF9WnbJeot2qXOG/1+R+0R7oK3xhcDKXC042c0KrOBfroW2gmA12BYj9x4OsUPyIL4gjaJ8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=RO+zNPHW; 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="RO+zNPHW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF1DDC116D0; Fri, 21 Nov 2025 13:28:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1763731729; bh=dbte+gbiRX63UeM5rcZAM7P/1jtVjR3FCW2NwUZBCvI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RO+zNPHWWQ9dR+d3lsJYMN+JBE65kD+r3DGCVlESKRVRzsVi06sxMe7vEQsRPyGTE GMsGNWvTIGAbSMiODZZWJR1d1b0iujn03WuNnlLSEpgXIuZF3Q2dUn0WrDokejZ7M1 0fLl9YTE45vh2GskoGhhulC61eunwQj+FfdzH5fg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Hangbin Liu , Felix Maurer , Sebastian Andrzej Siewior , Paolo Abeni , Sasha Levin Subject: [PATCH 6.12 061/185] hsr: Fix supervision frame sending on HSRv0 Date: Fri, 21 Nov 2025 14:11:28 +0100 Message-ID: <20251121130146.077940986@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251121130143.857798067@linuxfoundation.org> References: <20251121130143.857798067@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Felix Maurer [ Upstream commit 96a3a03abf3d8cc38cd9cb0d280235fbcf7c3f7f ] On HSRv0, no supervision frames were sent. The supervison frames were generated successfully, but failed the check for a sufficiently long mac header, i.e., at least sizeof(struct hsr_ethhdr), in hsr_fill_frame_info() because the mac header only contained the ethernet header. Fix this by including the HSR header in the mac header when generating HSR supervision frames. Note that the mac header now also includes the TLV fields. This matches how we set the headers on rx and also the size of struct hsrv0_ethhdr_sp. Reported-by: Hangbin Liu Closes: https://lore.kernel.org/netdev/aMONxDXkzBZZRfE5@fedora/ Fixes: 9cfb5e7f0ded ("net: hsr: fix hsr_init_sk() vs network/transport headers.") Signed-off-by: Felix Maurer Reviewed-by: Sebastian Andrzej Siewior Tested-by: Sebastian Andrzej Siewior Link: https://patch.msgid.link/4354114fea9a642fe71f49aeeb6c6159d1d61840.1762876095.git.fmaurer@redhat.com Tested-by: Hangbin Liu Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- net/hsr/hsr_device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c index d2ae9fbed9e30..ae368cdcbd936 100644 --- a/net/hsr/hsr_device.c +++ b/net/hsr/hsr_device.c @@ -320,6 +320,9 @@ static void send_hsr_supervision_frame(struct hsr_port *port, } hsr_stag = skb_put(skb, sizeof(struct hsr_sup_tag)); + skb_set_network_header(skb, ETH_HLEN + HSR_HLEN); + skb_reset_mac_len(skb); + set_hsr_stag_path(hsr_stag, (hsr->prot_version ? 0x0 : 0xf)); set_hsr_stag_HSR_ver(hsr_stag, hsr->prot_version); -- 2.51.0