summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTianyu Li <tianyu.li@arm.com>2021-05-26 14:20:57 +0800
committerMatthew Smith <mgsmith@netgate.com>2021-06-09 13:47:09 +0000
commit07d04f7b03077d1b6e93d9a430fedd31bd858023 (patch)
tree561565a3079af5470131a02600fb6a52db2842e3
parent8afa5d3ccd06df80212ce2ea23b6482287d9481b (diff)
l2: fix vrrp prefix mac comparison
VRRP prefix length is 5 bytes, doesn't make sense to compare with 6 bytes mac address Type: fix Signed-off-by: Tianyu Li <tianyu.li@arm.com> Change-Id: I70a9c9ca769f34a81cd568f9e6b9a3538e6ec710
-rw-r--r--src/vnet/l2/l2_arp_term.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vnet/l2/l2_arp_term.c b/src/vnet/l2/l2_arp_term.c
index 3fcd9c1c83d..17c8b1d84d0 100644
--- a/src/vnet/l2/l2_arp_term.c
+++ b/src/vnet/l2/l2_arp_term.c
@@ -332,8 +332,8 @@ arp_term_l2bd (vlib_main_t * vm,
|| ethernet_address_cast (arp0->ip4_over_ethernet[0].mac.bytes))
{
/* VRRP virtual MAC may be different to SMAC in ARP reply */
- if (!ethernet_mac_address_equal
- (arp0->ip4_over_ethernet[0].mac.bytes, vrrp_prefix))
+ if (clib_memcmp (arp0->ip4_over_ethernet[0].mac.bytes,
+ vrrp_prefix, sizeof (vrrp_prefix)) != 0)
{
error0 = ETHERNET_ARP_ERROR_l2_address_mismatch;
goto drop;