}
/* clear any local info associated with the ES */
-static void bgp_evpn_es_local_info_clear(struct bgp_evpn_es *es)
+static void bgp_evpn_es_local_info_clear(struct bgp_evpn_es *es, bool finish)
{
bool old_is_local;
bool is_local;
UNSET_FLAG(es->flags, BGP_EVPNES_LOCAL);
is_local = bgp_evpn_is_es_local_and_non_bypass(es);
- if (old_is_local != is_local)
+ if (!finish && (old_is_local != is_local))
bgp_evpn_mac_update_on_es_local_chg(es, is_local);
/* remove from the ES local list */
/* Clear local info associated with the ES and free it up if there is
* no remote reference
*/
- bgp_evpn_es_local_info_clear(es);
+ bgp_evpn_es_local_info_clear(es, false);
}
bool bgp_evpn_is_esi_local_and_non_bypass(esi_t *esi)
RB_FOREACH_SAFE (es, bgp_es_rb_head, &bgp_mh_info->es_rb_tree,
es_next) {
- bgp_evpn_es_local_info_clear(es);
+ bgp_evpn_es_local_info_clear(es, true);
}
if (bgp_mh_info->t_cons_check)
thread_cancel(&bgp_mh_info->t_cons_check);