summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_evpn_mh.h
diff options
context:
space:
mode:
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>2020-11-02 19:53:50 +0100
committerAnuradha Karuppiah <anuradhak@nvidia.com>2021-02-19 17:11:15 +0100
commit243b74eda653893f4ed7394fa5f7e1bb2ba2bee0 (patch)
tree5f91ba6aa2178019990bae3d39ce4d40d040aaa6 /zebra/zebra_evpn_mh.h
parentzebra: fix problem with SVI IP being advertised even if disabled (diff)
downloadfrr-243b74eda653893f4ed7394fa5f7e1bb2ba2bee0.tar.xz
frr-243b74eda653893f4ed7394fa5f7e1bb2ba2bee0.zip
zebra: changes to advertise SVI mac by default if evpn-mh is enabled
Added support for advertising SVI MAC if EVPN-MH is enabled. In the case of EVPN MH arp replies from an attached server can be sent to the ES-peer. To prevent flooding of the reply the SVI MAC needs to be advertised by default. Note: advertise-svi-ip could have been used as an alternate way to advertise SVI MAC. However that config cannot be turned on if SVI IPs are re-used (which is done to avoid wasting IP addresses in a subnet). Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_evpn_mh.h')
-rw-r--r--zebra/zebra_evpn_mh.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/zebra/zebra_evpn_mh.h b/zebra/zebra_evpn_mh.h
index 81ae740d4..6d2143477 100644
--- a/zebra/zebra_evpn_mh.h
+++ b/zebra/zebra_evpn_mh.h
@@ -180,6 +180,8 @@ struct zebra_evpn_access_bd {
struct list *mbr_zifs;
/* presence of zevpn activates the EVI on all the ESs in mbr_zifs */
zebra_evpn_t *zevpn;
+ /* SVI associated with the VLAN */
+ struct zebra_if *vlan_zif;
};
/* multihoming information stored in zrouter */
@@ -200,6 +202,10 @@ struct zebra_evpn_mh_info {
* this flag when the first local ES is detected.
*/
#define ZEBRA_EVPN_MH_ADV_REACHABLE_NEIGH_ONLY (1 << 2)
+/* If EVPN MH is enabled we advertise the SVI MAC address to avoid
+ * flooding of ARP replies rxed from the multi-homed host
+ */
+#define ZEBRA_EVPN_MH_ADV_SVI_MAC (1 << 3)
/* RB tree of Ethernet segments (used for EVPN-MH) */
struct zebra_es_rb_head es_rb_tree;
@@ -285,6 +291,10 @@ static inline bool zebra_evpn_mh_do_adv_reachable_neigh_only(void)
return !!(zmh_info->flags & ZEBRA_EVPN_MH_ADV_REACHABLE_NEIGH_ONLY);
}
+static inline bool zebra_evpn_mh_do_adv_svi_mac(void)
+{
+ return zmh_info && (zmh_info->flags & ZEBRA_EVPN_MH_ADV_SVI_MAC);
+}
/*****************************************************************************/
extern esi_t *zero_esi;
@@ -357,5 +367,8 @@ extern bool zebra_evpn_is_es_bond_member(struct interface *ifp);
extern void zebra_evpn_mh_print(struct vty *vty);
extern void zebra_evpn_mh_json(json_object *json);
extern void zebra_evpn_l2_nh_show(struct vty *vty, bool uj);
+extern void zebra_evpn_acc_bd_svi_set(struct zebra_if *vlan_zif,
+ struct zebra_if *br_zif, bool is_up);
+extern void zebra_evpn_acc_bd_svi_mac_add(struct interface *vlan_if);
#endif /* _ZEBRA_EVPN_MH_H */