aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/ethernet/mac_address.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vnet/ethernet/mac_address.h b/src/vnet/ethernet/mac_address.h
index 68feb3977f0..0631ec38bd2 100644
--- a/src/vnet/ethernet/mac_address.h
+++ b/src/vnet/ethernet/mac_address.h
@@ -111,11 +111,11 @@ mac_address_is_zero (const mac_address_t * mac)
static_always_inline u64
mac_address_as_u64 (const mac_address_t * mac)
{
- u64 *as_u64;
+ volatile u64 as_u64 = 0;
- as_u64 = (u64 *) mac->bytes;
+ clib_memcpy ((void *) &as_u64, mac->bytes, 6);
- return (*as_u64);
+ return as_u64;
}
static_always_inline void