git: 447a1e6914fa - stable/13 - ipfw: fix order of memcpy arguments.

From: Andrey V. Elsukov <ae_at_FreeBSD.org>
Date: Mon, 02 Dec 2024 10:37:39 UTC
The branch stable/13 has been updated by ae:

URL: https://cgit.FreeBSD.org/src/commit/?id=447a1e6914fa8ce26683246dab5ebfd210eba042

commit 447a1e6914fa8ce26683246dab5ebfd210eba042
Author:     Andrey V. Elsukov <ae@FreeBSD.org>
AuthorDate: 2024-11-23 12:52:43 +0000
Commit:     Andrey V. Elsukov <ae@FreeBSD.org>
CommitDate: 2024-12-02 10:36:48 +0000

    ipfw: fix order of memcpy arguments.
    
    This fixes `ipfw table N lookup addr` command for MAC tables.
    
    (cherry picked from commit e012d79c9c732a6aef21066feba2e5e48833cca4)
---
 sys/netpfil/ipfw/ip_fw_table_algo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netpfil/ipfw/ip_fw_table_algo.c b/sys/netpfil/ipfw/ip_fw_table_algo.c
index f2ea1ddfc384..e1e45cb3d085 100644
--- a/sys/netpfil/ipfw/ip_fw_table_algo.c
+++ b/sys/netpfil/ipfw/ip_fw_table_algo.c
@@ -4314,7 +4314,7 @@ ta_find_mac_radix_tentry(void *ta_state, struct table_info *ti,
 	if (tent->subtype == AF_LINK) {
 		struct sa_mac sa;
 		KEY_LEN(sa) = KEY_LEN_MAC;
-		memcpy(tent->k.mac, sa.mac_addr.octet, ETHER_ADDR_LEN);
+		memcpy(sa.mac_addr.octet, tent->k.mac, ETHER_ADDR_LEN);
 		rnh = (struct radix_node_head *)ti->state;
 		e = rnh->rnh_matchaddr(&sa, &rnh->rh);
 	}