From b44c77d01dcf9ebf80d7bcab097515ad8135bc05 Mon Sep 17 00:00:00 2001 From: Benoît Ganne Date: Tue, 20 Oct 2020 16:24:17 +0200 Subject: ethernet: mac must support 64-bits loads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/vnet/l2/l2_bvi.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vnet/l2') diff --git a/src/vnet/l2/l2_bvi.h b/src/vnet/l2/l2_bvi.h index 697e25bf3de..67b8e50f3f4 100644 --- a/src/vnet/l2/l2_bvi.h +++ b/src/vnet/l2/l2_bvi.h @@ -32,7 +32,7 @@ static_always_inline u32 l2_to_bvi_dmac_check (vnet_hw_interface_t * hi, u8 * dmac, ethernet_interface_t * ei, u8 have_sec_dmac) { - mac_address_t *sec_addr; + ethernet_interface_address_t *sec_addr; if (ethernet_mac_address_equal (dmac, hi->hw_address)) return TO_BVI_ERR_OK; @@ -41,7 +41,7 @@ l2_to_bvi_dmac_check (vnet_hw_interface_t * hi, u8 * dmac, { vec_foreach (sec_addr, ei->secondary_addrs) { - if (ethernet_mac_address_equal (dmac, (u8 *) sec_addr)) + if (ethernet_mac_address_equal (dmac, sec_addr->mac.bytes)) return TO_BVI_ERR_OK; } } -- cgit 1.2.3-korg