summaryrefslogtreecommitdiffstats
path: root/src/vnet/interface_api.c
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2020-10-20 16:24:17 +0200
committerDamjan Marion <dmarion@me.com>2020-11-13 11:17:50 +0000
commitb44c77d01dcf9ebf80d7bcab097515ad8135bc05 (patch)
tree71070f6ea6b5dc989730e1775f6c7916a07938fc /src/vnet/interface_api.c
parent41c0f45a56d4db5b2ee4ae4fff7f3f0571a23189 (diff)
ethernet: mac must support 64-bits loads
ethernet dataplane loads MAC addresses as 64-bits loads for efficiency. We must make sure it is valid, especially for the vector of secondary MACs. Type: fix Change-Id: I851e319b8a973c154e85ff9f05f3b8e385939788 Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/vnet/interface_api.c')
-rw-r--r--src/vnet/interface_api.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vnet/interface_api.c b/src/vnet/interface_api.c
index 51555cabc6b..4fe655c5024 100644
--- a/src/vnet/interface_api.c
+++ b/src/vnet/interface_api.c
@@ -262,8 +262,8 @@ send_sw_interface_details (vpe_api_main_t * am,
ethernet_interface_t *ei;
ei = pool_elt_at_index (em->interfaces, hi->hw_instance);
- ASSERT (sizeof (mp->l2_address) >= sizeof (ei->address));
- mac_address_encode ((mac_address_t *) ei->address, mp->l2_address);
+ ASSERT (sizeof (mp->l2_address) >= sizeof (ei->address.mac));
+ mac_address_encode (&ei->address.mac, mp->l2_address);
}
else if (swif->sup_sw_if_index != swif->sw_if_index)
{
@@ -993,7 +993,7 @@ static void vl_api_sw_interface_get_mac_address_t_handler
rmp->context = mp->context;
rmp->retval = htonl (rv);
if (!rv && eth_if)
- mac_address_encode ((mac_address_t *) eth_if->address, rmp->mac_address);
+ mac_address_encode (&eth_if->address.mac, rmp->mac_address);
vl_api_send_msg (reg, (u8 *) rmp);
}