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 9A82BDDAB; Wed, 3 Dec 2025 15:41:09 +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=1764776469; cv=none; b=G0CZS0athPObSthvJnZ5DL/F9QpYcYpqlLhGLNjbLOsn2fUnifCrZ9zC+ui6PjdZ6TVqZKSITT9wqmv1R1zNWZvng8pLC1AGZ18Vz5QOcsKX/NxGIp/jePMImBMlLTRKeoH1DiqmvhnMpMp2n1B2rlKTPQ9iYzCd3NR22jSPqtU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764776469; c=relaxed/simple; bh=YUHlsJyoXAg3ad/PrxF3UwZcYXIQP7bv0nCBr0QFfOY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gNm5KBP3sk359WXNZq5ZYUVCKH8vuP4gcnzLLfSoZSxqrpEml+NpZJ+UpFQqcgCEGOOAlU7YXIdCwjRqpmWKIDfBeBuDKrA7i64aM2EfqemvHJYmjDHKM3oBz92y2B/MBA0Zp1ivfRZDhEn/5ZxWD/UZ5SQm4cL+Lrw+FFy25d8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yGxBzIRu; 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="yGxBzIRu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2520EC4CEF5; Wed, 3 Dec 2025 15:41:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1764776469; bh=YUHlsJyoXAg3ad/PrxF3UwZcYXIQP7bv0nCBr0QFfOY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yGxBzIRuALt4ST4DVREt3u2kuFQ7QWZdY/ICbtQlEJBvzJlEkjgd5f/Me0jp2yEoS x1kFzX0Rsw4dgDPRVNcPNT1kbew9W2jUct0dK+k4t3RrrKGQyeWuq23uTunbwnpA9u 8wIPH8XP7C+0717TsS+2Gvnsj/fI+EG+s2T3m/k4= 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 5.10 192/300] hsr: Fix supervision frame sending on HSRv0 Date: Wed, 3 Dec 2025 16:26:36 +0100 Message-ID: <20251203152407.739034913@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251203152400.447697997@linuxfoundation.org> References: <20251203152400.447697997@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 5.10-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 505eb58f7e081..5a54a18892080 100644 --- a/net/hsr/hsr_device.c +++ b/net/hsr/hsr_device.c @@ -296,6 +296,9 @@ static void send_hsr_supervision_frame(struct hsr_port *master, } 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