Skip to content

Commit 3d3aa94

Browse files
aloktiwakuba-moo
authored andcommitted
bnxt_en: correct offset handling for IPv6 destination address
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: 9b9eb51 ("bnxt_en: Add support for NAT(L3/L4 rewrite)") Signed-off-by: Alok Tiwari <[email protected]> Reviewed-by: Somnath Kotur <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent a461b2f commit 3d3aa94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ bnxt_tc_parse_pedit(struct bnxt *bp, struct bnxt_tc_actions *actions,
244244
offset < offset_of_ip6_daddr + 16) {
245245
actions->nat.src_xlate = false;
246246
idx = (offset - offset_of_ip6_daddr) / 4;
247-
actions->nat.l3.ipv6.saddr.s6_addr32[idx] = htonl(val);
247+
actions->nat.l3.ipv6.daddr.s6_addr32[idx] = htonl(val);
248248
} else {
249249
netdev_err(bp->dev,
250250
"%s: IPv6_hdr: Invalid pedit field\n",

0 commit comments

Comments
 (0)