From 56c772801045ebf67fe4d698d3e1d6b521d96eae Mon Sep 17 00:00:00 2001 From: Nikola Dancejic Date: Tue, 14 May 2024 22:19:15 +0000 Subject: [PATCH] fixing memcpy of mac in unit test --- syncd/tests.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syncd/tests.cpp b/syncd/tests.cpp index cbf4a872c..4a2591a8a 100644 --- a/syncd/tests.cpp +++ b/syncd/tests.cpp @@ -742,7 +742,7 @@ void test_bulk_neighbor_set() ASSERT_SUCCESS("Failed to create router interface"); neighbor_entry.ip_address.addr_family = SAI_IP_ADDR_FAMILY_IPV4; - neighbor_entry.ip_address.addr.ip4 = htonl(0x0a000000 | i); + neighbor_entry.ip_address.addr.ip4 = 0x10000001 + i; neighbor_entry.rif_id = rif; neighbor_entry.switch_id = switch_id; neighbors.push_back(neighbor_entry); @@ -752,7 +752,7 @@ void test_bulk_neighbor_set() sai_mac_t mac = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; attr.id = SAI_NEIGHBOR_ENTRY_ATTR_DST_MAC_ADDRESS; - attr.value.mac = mac; + memcpy(attr.value.mac, mac, 6); neighbor_attrs.push_back(list); neighbor_attrs_count.push_back(2); }