From 63ce2ee70cd69501de14a86508974d2a58b1e24d Mon Sep 17 00:00:00 2001 From: Chirag Shah Date: Sat, 28 Jul 2018 11:23:10 -0700 Subject: [PATCH] zebra: display consistant mac count show evpn mac vni all show evpn mac vni x does not display local svi and anycast mac into count. Ticket:CM-20456 Testing Done: Before: TOR1# show evpn mac vni 1008 Number of MACs (local and remote) known for this VNI: 4 MAC Type Intf/Remote VTEP VLAN 44:38:39:00:6b:4c local vlan1008 1008 00:02:00:00:00:04 local hostbond5 1008 00:02:00:00:00:02 local hostbond4 1008 00:00:5e:00:01:01 local vlan1008-v0 1008 00:02:00:00:00:0c remote 27.0.0.15 00:02:00:00:00:0a remote 27.0.0.15 dell-s6000-07# After: TOR1# show evpn mac vni 1008 Number of MACs (local and remote) known for this VNI: 6 MAC Type Intf/Remote VTEP VLAN 44:38:39:00:6b:4c local vlan1008 1008 00:02:00:00:00:04 local hostbond5 1008 00:02:00:00:00:02 local hostbond4 1008 00:00:5e:00:01:01 local vlan1008-v0 1008 00:02:00:00:00:0c remote 27.0.0.15 00:02:00:00:00:0a remote 27.0.0.15 Signed-off-by: Chirag Shah --- zebra/zebra_vxlan.c | 1 + 1 file changed, 1 insertion(+) diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index 06d1b3618c..4955f3f77c 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -244,6 +244,7 @@ static uint32_t num_valid_macs(zebra_vni_t *zvni) for (hb = hash->index[i]; hb; hb = hb->next) { mac = (zebra_mac_t *)hb->data; if (CHECK_FLAG(mac->flags, ZEBRA_MAC_REMOTE) + || CHECK_FLAG(mac->flags, ZEBRA_MAC_LOCAL) || !CHECK_FLAG(mac->flags, ZEBRA_MAC_AUTO)) num_macs++; } -- 2.39.5