aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ethernet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ethernet')
-rw-r--r--src/vnet/ethernet/ethernet.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/ethernet/ethernet.h b/src/vnet/ethernet/ethernet.h
index 2a3383a9eaa..9a97817262c 100644
--- a/src/vnet/ethernet/ethernet.h
+++ b/src/vnet/ethernet/ethernet.h
@@ -61,6 +61,12 @@ ethernet_mac_address_is_multicast_u64 (u64 a)
return (a & (1ULL << (5 * 8))) != 0;
}
+static inline int
+ethernet_mac_address_is_zero (u8 * mac)
+{
+ return ((*((u32 *) mac) == 0) && (*((u16 *) (mac + 4)) == 0));
+}
+
static_always_inline int
ethernet_frame_is_tagged (u16 type)
{