aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/ethernet/interface.c1
-rw-r--r--src/vnet/l2/l2_fib.h11
2 files changed, 4 insertions, 8 deletions
diff --git a/src/vnet/ethernet/interface.c b/src/vnet/ethernet/interface.c
index 7b2b162f1a0..d79669206a9 100644
--- a/src/vnet/ethernet/interface.c
+++ b/src/vnet/ethernet/interface.c
@@ -311,6 +311,7 @@ ethernet_register_interface (vnet_main_t * vnm,
clib_memcpy (ei->address, address, sizeof (ei->address));
vec_add (hi->hw_address, address, sizeof (ei->address));
+ CLIB_MEM_UNPOISON (hi->hw_address, 8);
if (error)
{
diff --git a/src/vnet/l2/l2_fib.h b/src/vnet/l2/l2_fib.h
index 20ba3da9aa3..a1dbc9db5c7 100644
--- a/src/vnet/l2/l2_fib.h
+++ b/src/vnet/l2/l2_fib.h
@@ -214,12 +214,7 @@ l2fib_compute_hash_bucket (l2fib_entry_key_t * key)
return result % L2FIB_NUM_BUCKETS;
}
-/**
- * make address sanitizer skip this:
- * The 6-Bytes mac-address is cast into an 8-Bytes u64, with 2 additional Bytes.
- * l2fib_make_key() does read those two Bytes but does not use them.
- */
-always_inline u64 __attribute__ ((no_sanitize_address))
+always_inline u64
l2fib_make_key (const u8 * mac_address, u16 bd_index)
{
u64 temp;
@@ -233,14 +228,14 @@ l2fib_make_key (const u8 * mac_address, u16 bd_index)
* Create the in-register key as F:E:D:C:B:A:H:L
* In memory the key is L:H:A:B:C:D:E:F
*/
- temp = *((u64 *) (mac_address)) << 16;
+ temp = CLIB_MEM_OVERFLOW_LOAD (*, (u64 *) mac_address) << 16;
temp = (temp & ~0xffff) | (u64) (bd_index);
#else
/*
* Create the in-register key as H:L:A:B:C:D:E:F
* In memory the key is H:L:A:B:C:D:E:F
*/
- temp = *((u64 *) (mac_address)) >> 16;
+ temp = CLIB_MEM_OVERFLOW_LOAD (*, (u64 *) mac_address) >> 16;
temp = temp | (((u64) bd_index) << 48);
#endif