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 1BDCB23506A; Tue, 30 Sep 2025 15:04:20 +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=1759244660; cv=none; b=sKb1PtuFyP167OkDq1ZJ+2RJieztWcPYlKd9H/zL3uZDq/Dj3zJd/1VTziD/1cKOpq1G+CtLWY0BSmUjjKCAPTDLiwROIe1Cl5iaLMl3R1WdoJJnGiUBQ26gF9cLDtR8/HsMJ4PACewMmMzK6M/9i2oE2cEKZsz1nQruzE60y1o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759244660; c=relaxed/simple; bh=5DC6GaPpuuWW+MtbsNSzhKwuGryIZpfzvcFHDz0thi4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=le6OEmvmTRz0nG+7LNTifBY4qzs1nmTmUK84ovBwtOLSzJCGt2i7G2PXlUgUkgjDh9H8Jy9Y9ku6xan2vBLXeBWswJqh48/SrRJUA6+axoNMw1NsIL7yfFsyvJ6WCyZP301MkAKaAU0WLpE9/pglTjXeRrkxh1dm9f7ti7OpOAw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=t425iE0O; 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="t425iE0O" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97E23C113D0; Tue, 30 Sep 2025 15:04:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759244660; bh=5DC6GaPpuuWW+MtbsNSzhKwuGryIZpfzvcFHDz0thi4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t425iE0O2QUPHRGhpmi/xpidsodUpcXTADJ85Lefb1RtzuUapBbdRWBEtQ4/gwmiO 5L6Smfs4Zb81InhHBp7V6TukfxFh9szFJ3Zm9ML8PGGC5ijmjc6aGjJkCn0Db1z5uW ZWAJbbWHcym194gq/1XeVvgb/QTGnOCpBiGfspHg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alok Tiwari , Somnath Kotur , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.16 075/143] bnxt_en: correct offset handling for IPv6 destination address Date: Tue, 30 Sep 2025 16:46:39 +0200 Message-ID: <20250930143834.229670615@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250930143831.236060637@linuxfoundation.org> References: <20250930143831.236060637@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.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alok Tiwari [ Upstream commit 3d3aa9472c6dd0704e9961ed4769caac5b1c8d52 ] In bnxt_tc_parse_pedit(), the code incorrectly writes IPv6 destination values to the source address field (saddr) when processing pedit offsets within the destination address range. This patch corrects the assignment to use daddr instead of saddr, ensuring that pedit operations on IPv6 destination addresses are applied correctly. Fixes: 9b9eb518e338 ("bnxt_en: Add support for NAT(L3/L4 rewrite)") Signed-off-by: Alok Tiwari Reviewed-by: Somnath Kotur Link: https://patch.msgid.link/20250920121157.351921-1-alok.a.tiwari@oracle.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c index d2ca90407cce7..8057350236c5e 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c @@ -244,7 +244,7 @@ bnxt_tc_parse_pedit(struct bnxt *bp, struct bnxt_tc_actions *actions, offset < offset_of_ip6_daddr + 16) { actions->nat.src_xlate = false; idx = (offset - offset_of_ip6_daddr) / 4; - actions->nat.l3.ipv6.saddr.s6_addr32[idx] = htonl(val); + actions->nat.l3.ipv6.daddr.s6_addr32[idx] = htonl(val); } else { netdev_err(bp->dev, "%s: IPv6_hdr: Invalid pedit field\n", -- 2.51.0