bgp_attr_set_ecommunity(
attr,
ecommunity_merge(bgp_attr_get_ecommunity(attr), &ecom_df));
-
- attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES);
}
/* Create or update local type-4 route */
ecom));
}
}
-
- attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES);
}
/* Extended communities associated with EAD-per-EVI */
bgp_attr_set_ecommunity(
attr,
ecommunity_merge(bgp_attr_get_ecommunity(attr), ecom));
-
- attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES);
}
/* Update EVPN EAD (type-1) route -
}
}
- if (node_to_del)
- list_delete_node(bgp_mh_info->ead_es_export_rtl,
- node_to_del);
+ assert(node_to_del);
+ list_delete_node(bgp_mh_info->ead_es_export_rtl,
+ node_to_del);
}
} else {
listnode_add_sort(bgp_mh_info->ead_es_export_rtl, ecomcfg);
* This is done indirectly by re-attempting an install of the
* route in the associated VRFs. As a part of the VRF install use
* of l3 NHG is evaluated and this results in the
- * attr.es_flag ATTR_ES_USE_L3_NHG being set or cleared.
+ * attr.es_flag ATTR_ES_L3_NHG_USE being set or cleared.
*/
static void
bgp_evpn_es_path_update_on_es_vrf_chg(struct bgp_evpn_es_vrf *es_vrf,
{
struct bgp_evpn_es *es;
- if (!bgp)
- return NULL;
-
es = XCALLOC(MTYPE_BGP_EVPN_ES, sizeof(struct bgp_evpn_es));
/* set the ESI */
struct in_addr originator_ip, bool oper_up,
uint16_t df_pref, bool bypass)
{
- char buf[ESI_STR_LEN];
struct bgp_evpn_es *es;
bool new_es = true;
bool regen_esr = false;
if (es) {
if (CHECK_FLAG(es->flags, BGP_EVPNES_LOCAL))
new_es = false;
- } else {
+ } else
es = bgp_evpn_es_new(bgp, esi);
- if (!es) {
- flog_err(EC_BGP_ES_CREATE,
- "%u: Failed to allocate ES entry for ESI %s - at Local ES Add",
- bgp->vrf_id, esi_to_str(esi, buf, sizeof(buf)));
- return -1;
- }
- }
if (BGP_DEBUG(evpn_mh, EVPN_MH_ES))
zlog_debug("add local es %s orig-ip %pI4 df_pref %u %s",
static bool bgp_evpn_l3nhg_zebra_ok(struct bgp_evpn_es_vrf *es_vrf)
{
- if (!bgp_mh_info->host_routes_use_l3nhg && !bgp_mh_info->install_l3nhg)
+ if (!bgp_mh_info->host_routes_use_l3nhg)
return false;
/* Check socket. */
&p->prefix.ead_addr.ip.ipaddr_v4);
es = bgp_evpn_es_find(esi);
- if (!es) {
+ if (!es)
es = bgp_evpn_es_new(bgp, esi);
- if (!es) {
- flog_err(EC_BGP_ES_CREATE,
- "%u: Failed to allocate ES entry for ESI %s - at remote ES Add",
- bgp->vrf_id, esi_to_str(esi, buf, sizeof(buf)));
- return -1;
- }
- }
es_evi = bgp_evpn_es_evi_find(es, vpn);
if (!es_evi)
/* config knobs - XXX add cli to control it */
bgp_mh_info->ead_evi_adv_for_down_links = true;
bgp_mh_info->consistency_checking = true;
- bgp_mh_info->install_l3nhg = false;
bgp_mh_info->host_routes_use_l3nhg = BGP_EVPN_MH_USE_ES_L3NHG_DEF;
bgp_mh_info->suppress_l3_ecomm_on_inactive_es = true;
bgp_mh_info->bgp_evpn_nh_setup = true;