summaryrefslogtreecommitdiff
path: root/zebra/zebra_evpn_mh.h
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_evpn_mh.h')
-rw-r--r--zebra/zebra_evpn_mh.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/zebra/zebra_evpn_mh.h b/zebra/zebra_evpn_mh.h
index dc2c299cf2..81ae740d49 100644
--- a/zebra/zebra_evpn_mh.h
+++ b/zebra/zebra_evpn_mh.h
@@ -88,6 +88,13 @@ struct zebra_evpn_es {
* advertised via the ESR
*/
uint16_t df_pref;
+
+ /* When a new ES is configured it is held in a non-DF state
+ * for 3 seconds. This allows the peer Type-4 routes to be
+ * imported before running the DF election.
+ */
+#define ZEBRA_EVPN_MH_DF_DELAY_TIME 3 /* seconds */
+ struct thread *df_delay_timer;
};
RB_HEAD(zebra_es_rb_head, zebra_evpn_es);
RB_PROTOTYPE(zebra_es_rb_head, zebra_evpn_es, rb_node, zebra_es_rb_cmp);
@@ -188,6 +195,11 @@ struct zebra_evpn_mh_info {
* first local ES, DAD is turned off
*/
#define ZEBRA_EVPN_MH_DUP_ADDR_DETECT_OFF (1 << 1)
+/* If EVPN MH is enabled we only advertise REACHABLE neigh entries as Type-2
+ * routes. As there is no global config knob for enabling EVPN MH we turn
+ * this flag when the first local ES is detected.
+ */
+#define ZEBRA_EVPN_MH_ADV_REACHABLE_NEIGH_ONLY (1 << 2)
/* RB tree of Ethernet segments (used for EVPN-MH) */
struct zebra_es_rb_head es_rb_tree;
@@ -268,6 +280,12 @@ static inline bool zebra_evpn_mh_do_dup_addr_detect(void)
return !(zmh_info->flags & ZEBRA_EVPN_MH_DUP_ADDR_DETECT_OFF);
}
+static inline bool zebra_evpn_mh_do_adv_reachable_neigh_only(void)
+{
+ return !!(zmh_info->flags & ZEBRA_EVPN_MH_ADV_REACHABLE_NEIGH_ONLY);
+}
+
+
/*****************************************************************************/
extern esi_t *zero_esi;
extern void zebra_evpn_mh_init(void);