*/
static int delete_all_vni_routes(struct bgp *bgp, struct bgpevpn *vpn);
static void bgp_evpn_update_type2_route_entry(struct bgp *bgp,
- struct bgpevpn *vpn,
- struct bgp_node *rn, struct bgp_path_info *local_pi,
- const char *caller);
+ struct bgpevpn *vpn,
+ struct bgp_dest *dest,
+ struct bgp_path_info *local_pi,
+ const char *caller);
static struct in_addr zero_vtep_ip;
/*
attr->mp_nexthop_len = IPV6_MAX_BYTELEN;
}
-struct bgp_node *bgp_global_evpn_node_get(
- struct bgp_table *table, afi_t afi,
- safi_t safi, const struct prefix_evpn *evp,
- struct prefix_rd *prd)
+struct bgp_dest *bgp_global_evpn_node_get(struct bgp_table *table, afi_t afi,
+ safi_t safi,
+ const struct prefix_evpn *evp,
+ struct prefix_rd *prd)
{
struct prefix_evpn global_p;
return bgp_afi_node_get(table, afi, safi, (struct prefix *)evp, prd);
}
-struct bgp_node *bgp_global_evpn_node_lookup(
- struct bgp_table *table, afi_t afi,
- safi_t safi, const struct prefix_evpn *evp,
- struct prefix_rd *prd)
+struct bgp_dest *bgp_global_evpn_node_lookup(struct bgp_table *table, afi_t afi,
+ safi_t safi,
+ const struct prefix_evpn *evp,
+ struct prefix_rd *prd)
{
struct prefix_evpn global_p;
}
static void bgp_evpn_get_sync_info(struct bgp *bgp, esi_t *esi,
- struct bgp_node *rn, uint32_t loc_seq, uint32_t *max_sync_seq,
- bool *active_on_peer, bool *peer_router,
- bool *proxy_from_peer)
+ struct bgp_dest *dest, uint32_t loc_seq,
+ uint32_t *max_sync_seq, bool *active_on_peer,
+ bool *peer_router, bool *proxy_from_peer)
{
struct bgp_path_info *tmp_pi;
struct bgp_path_info *second_best_path = NULL;
/* find the best non-local path. a local path can only be present
* as best path
*/
- for (tmp_pi = bgp_dest_get_bgp_path_info(rn); tmp_pi;
- tmp_pi = tmp_pi->next) {
+ for (tmp_pi = bgp_dest_get_bgp_path_info(dest); tmp_pi;
+ tmp_pi = tmp_pi->next) {
if (tmp_pi->sub_type != BGP_ROUTE_IMPORTED ||
!CHECK_FLAG(tmp_pi->flags, BGP_PATH_VALID))
continue;
* VPN route table. It will take precedence over all sync paths.
*/
static void update_evpn_route_entry_sync_info(struct bgp *bgp,
- struct bgp_node *rn, struct attr *attr, uint32_t loc_seq,
- bool setup_sync)
+ struct bgp_dest *dest,
+ struct attr *attr,
+ uint32_t loc_seq, bool setup_sync)
{
esi_t *esi;
- struct prefix_evpn *evp = (struct prefix_evpn *)&rn->p;
+ struct prefix_evpn *evp = (struct prefix_evpn *)&dest->p;
if (evp->prefix.route_type != BGP_EVPN_MAC_IP_ROUTE)
return;
bool peer_router = false;
bool proxy_from_peer = false;
- bgp_evpn_get_sync_info(bgp, esi, rn, loc_seq,
- &max_sync_seq, &active_on_peer,
- &peer_router, &proxy_from_peer);
+ bgp_evpn_get_sync_info(bgp, esi, dest, loc_seq,
+ &max_sync_seq, &active_on_peer,
+ &peer_router, &proxy_from_peer);
attr->mm_sync_seqnum = max_sync_seq;
if (active_on_peer)
attr->es_flags |= ATTR_ES_PEER_ACTIVE;
}
static void bgp_evpn_update_type2_route_entry(struct bgp *bgp,
- struct bgpevpn *vpn, struct bgp_node *rn,
- struct bgp_path_info *local_pi, const char *caller)
+ struct bgpevpn *vpn,
+ struct bgp_dest *dest,
+ struct bgp_path_info *local_pi,
+ const char *caller)
{
afi_t afi = AFI_L2VPN;
safi_t safi = SAFI_EVPN;
struct attr *attr_new;
uint32_t seq;
int add_l3_ecomm = 0;
- struct bgp_node *global_rn;
+ struct bgp_dest *global_dest;
struct bgp_path_info *global_pi;
- struct prefix_evpn *evp = (struct prefix_evpn *)&rn->p;
+ struct prefix_evpn *evp = (struct prefix_evpn *)&dest->p;
int route_change;
bool old_is_sync = false;
}
/* Update the route entry. */
- route_change = update_evpn_route_entry(bgp, vpn, afi, safi,
- rn, &attr, 0, &pi, 0, seq,
- true /* setup_sync */, &old_is_sync);
+ route_change = update_evpn_route_entry(
+ bgp, vpn, afi, safi, dest, &attr, 0, &pi, 0, seq,
+ true /* setup_sync */, &old_is_sync);
assert(pi);
attr_new = pi->attr;
* advertised to peers; otherwise, ensure it is evicted and
* (re)install the remote route into zebra.
*/
- evpn_route_select_install(bgp, vpn, rn);
+ evpn_route_select_install(bgp, vpn, dest);
if (CHECK_FLAG(pi->flags, BGP_PATH_REMOVED)) {
route_change = 0;
} else {
if (!CHECK_FLAG(pi->flags, BGP_PATH_SELECTED)) {
route_change = 0;
- evpn_cleanup_local_non_best_route(bgp, vpn, rn, pi);
+ evpn_cleanup_local_non_best_route(bgp, vpn, dest, pi);
} else {
bool new_is_sync;
if (route_change) {
/* Update route in global routing table. */
- global_rn = bgp_global_evpn_node_get(bgp->rib[afi][safi],
- afi, safi, evp, &vpn->prd);
- assert(global_rn);
- update_evpn_route_entry(bgp, vpn, afi, safi, global_rn,
- attr_new, 0, &global_pi, 0,
- mac_mobility_seqnum(attr_new),
- false /* setup_sync */, NULL /* old_is_sync */);
+ global_dest = bgp_global_evpn_node_get(bgp->rib[afi][safi], afi,
+ safi, evp, &vpn->prd);
+ assert(global_dest);
+ update_evpn_route_entry(
+ bgp, vpn, afi, safi, global_dest, attr_new, 0,
+ &global_pi, 0, mac_mobility_seqnum(attr_new),
+ false /* setup_sync */, NULL /* old_is_sync */);
/* Schedule for processing and unlock node. */
- bgp_process(bgp, global_rn, afi, safi);
- bgp_dest_unlock_node(global_rn);
+ bgp_process(bgp, global_dest, afi, safi);
+ bgp_dest_unlock_node(global_dest);
}
/* Unintern temporary. */
* installed in the ES's routing table.
*/
static int bgp_evpn_es_route_select_install(struct bgp *bgp,
- struct bgp_evpn_es *es,
- struct bgp_node *rn)
+ struct bgp_evpn_es *es,
+ struct bgp_dest *dest)
{
int ret = 0;
afi_t afi = AFI_L2VPN;
struct bgp_path_info_pair old_and_new;
/* Compute the best path. */
- bgp_best_selection(bgp, rn, &bgp->maxpaths[afi][safi],
- &old_and_new, afi, safi);
+ bgp_best_selection(bgp, dest, &bgp->maxpaths[afi][safi], &old_and_new,
+ afi, safi);
old_select = old_and_new.old;
new_select = old_and_new.new;
* updated
*/
if (old_select && old_select == new_select
- && old_select->type == ZEBRA_ROUTE_BGP
- && old_select->sub_type == BGP_ROUTE_IMPORTED
- && !CHECK_FLAG(rn->flags, BGP_NODE_USER_CLEAR)
- && !CHECK_FLAG(old_select->flags, BGP_PATH_ATTR_CHANGED)
- && !bgp_addpath_is_addpath_used(&bgp->tx_addpath, afi, safi)) {
+ && old_select->type == ZEBRA_ROUTE_BGP
+ && old_select->sub_type == BGP_ROUTE_IMPORTED
+ && !CHECK_FLAG(dest->flags, BGP_NODE_USER_CLEAR)
+ && !CHECK_FLAG(old_select->flags, BGP_PATH_ATTR_CHANGED)
+ && !bgp_addpath_is_addpath_used(&bgp->tx_addpath, afi, safi)) {
if (bgp_zebra_has_route_changed(old_select)) {
bgp_evpn_es_vtep_add(bgp, es,
old_select->attr->nexthop,
true /*esr*/);
}
UNSET_FLAG(old_select->flags, BGP_PATH_MULTIPATH_CHG);
- bgp_zebra_clear_route_change_flags(rn);
+ bgp_zebra_clear_route_change_flags(dest);
return ret;
}
/* If the user did a "clear" this flag will be set */
- UNSET_FLAG(rn->flags, BGP_NODE_USER_CLEAR);
+ UNSET_FLAG(dest->flags, BGP_NODE_USER_CLEAR);
/* bestpath has changed; update relevant fields and install or uninstall
* into the zebra RIB.
*/
if (old_select || new_select)
- bgp_bump_version(rn);
+ bgp_bump_version(dest);
if (old_select)
- bgp_path_info_unset_flag(rn, old_select, BGP_PATH_SELECTED);
+ bgp_path_info_unset_flag(dest, old_select, BGP_PATH_SELECTED);
if (new_select) {
- bgp_path_info_set_flag(rn, new_select, BGP_PATH_SELECTED);
- bgp_path_info_unset_flag(rn, new_select, BGP_PATH_ATTR_CHANGED);
+ bgp_path_info_set_flag(dest, new_select, BGP_PATH_SELECTED);
+ bgp_path_info_unset_flag(dest, new_select,
+ BGP_PATH_ATTR_CHANGED);
UNSET_FLAG(new_select->flags, BGP_PATH_MULTIPATH_CHG);
}
}
/* Clear any route change flags. */
- bgp_zebra_clear_route_change_flags(rn);
+ bgp_zebra_clear_route_change_flags(dest);
/* Reap old select bgp_path_info, if it has been removed */
if (old_select && CHECK_FLAG(old_select->flags, BGP_PATH_REMOVED))
- bgp_path_info_reap(rn, old_select);
+ bgp_path_info_reap(dest, old_select);
return ret;
}
struct bgp_path_info *parent_pi)
{
int ret = 0;
- struct bgp_node *rn = NULL;
+ struct bgp_dest *dest = NULL;
struct bgp_path_info *pi = NULL;
struct attr *attr_new = NULL;
/* Create (or fetch) route within the VNI.
* NOTE: There is no RD here.
*/
- rn = bgp_node_get(es->route_table, (struct prefix *)p);
+ dest = bgp_node_get(es->route_table, (struct prefix *)p);
/* Check if route entry is already present. */
- for (pi = bgp_dest_get_bgp_path_info(rn); pi; pi = pi->next)
+ for (pi = bgp_dest_get_bgp_path_info(dest); pi; pi = pi->next)
if (pi->extra
&& (struct bgp_path_info *)pi->extra->parent ==
parent_pi)
/* Create new route with its attribute. */
pi = info_make(parent_pi->type, BGP_ROUTE_IMPORTED, 0,
- parent_pi->peer, attr_new, rn);
+ parent_pi->peer, attr_new, dest);
SET_FLAG(pi->flags, BGP_PATH_VALID);
bgp_path_info_extra_get(pi);
pi->extra->parent = bgp_path_info_lock(parent_pi);
- bgp_dest_lock_node((struct bgp_node *)parent_pi->net);
- bgp_path_info_add(rn, pi);
+ bgp_dest_lock_node((struct bgp_dest *)parent_pi->net);
+ bgp_path_info_add(dest, pi);
} else {
if (attrhash_cmp(pi->attr, parent_pi->attr)
&& !CHECK_FLAG(pi->flags, BGP_PATH_REMOVED)) {
- bgp_dest_unlock_node(rn);
+ bgp_dest_unlock_node(dest);
return 0;
}
/* The attribute has changed. */
/* Restore route, if needed. */
if (CHECK_FLAG(pi->flags, BGP_PATH_REMOVED))
- bgp_path_info_restore(rn, pi);
+ bgp_path_info_restore(dest, pi);
/* Mark if nexthop has changed. */
if (!IPV4_ADDR_SAME(&pi->attr->nexthop, &attr_new->nexthop))
}
/* Perform route selection and update zebra, if required. */
- ret = bgp_evpn_es_route_select_install(bgp, es, rn);
+ ret = bgp_evpn_es_route_select_install(bgp, es, dest);
- bgp_dest_unlock_node(rn);
+ bgp_dest_unlock_node(dest);
return ret;
}
struct prefix_evpn *p, struct bgp_path_info *parent_pi)
{
int ret;
- struct bgp_node *rn;
+ struct bgp_dest *dest;
struct bgp_path_info *pi;
if (!es->route_table)
/* Locate route within the ESI.
* NOTE: There is no RD here.
*/
- rn = bgp_node_lookup(es->route_table, (struct prefix *)p);
- if (!rn)
+ dest = bgp_node_lookup(es->route_table, (struct prefix *)p);
+ if (!dest)
return 0;
/* Find matching route entry. */
- for (pi = bgp_dest_get_bgp_path_info(rn); pi; pi = pi->next)
+ for (pi = bgp_dest_get_bgp_path_info(dest); pi; pi = pi->next)
if (pi->extra
&& (struct bgp_path_info *)pi->extra->parent ==
parent_pi)
return 0;
/* Mark entry for deletion */
- bgp_path_info_delete(rn, pi);
+ bgp_path_info_delete(dest, pi);
/* Perform route selection and update zebra, if required. */
- ret = bgp_evpn_es_route_select_install(bgp, es, rn);
+ ret = bgp_evpn_es_route_select_install(bgp, es, dest);
/* Unlock route node. */
- bgp_dest_unlock_node(rn);
+ bgp_dest_unlock_node(dest);
return ret;
}
*/
static void bgp_evpn_es_route_del_all(struct bgp *bgp, struct bgp_evpn_es *es)
{
- struct bgp_node *rn;
+ struct bgp_dest *dest;
struct bgp_path_info *pi, *nextpi;
/* de-activate the ES */
bgp_evpn_local_type1_evi_route_del(bgp, es);
/* Walk this ES's routing table and delete all routes. */
- for (rn = bgp_table_top(es->route_table); rn;
- rn = bgp_route_next(rn)) {
- for (pi = bgp_dest_get_bgp_path_info(rn);
- (pi != NULL) && (nextpi = pi->next, 1);
- pi = nextpi) {
- bgp_path_info_delete(rn, pi);
- bgp_path_info_reap(rn, pi);
+ for (dest = bgp_table_top(es->route_table); dest;
+ dest = bgp_route_next(dest)) {
+ for (pi = bgp_dest_get_bgp_path_info(dest);
+ (pi != NULL) && (nextpi = pi->next, 1); pi = nextpi) {
+ bgp_path_info_delete(dest, pi);
+ bgp_path_info_reap(dest, pi);
}
}
}
* Note: vpn is applicable only to EAD-EVI routes (NULL for EAD-ES and
* ESR).
*/
-static int bgp_evpn_mh_route_update(struct bgp *bgp,
- struct bgp_evpn_es *es, struct bgpevpn *vpn, afi_t afi,
- safi_t safi, struct bgp_node *rn, struct attr *attr,
- int add, struct bgp_path_info **ri, int *route_changed)
+static int bgp_evpn_mh_route_update(struct bgp *bgp, struct bgp_evpn_es *es,
+ struct bgpevpn *vpn, afi_t afi, safi_t safi,
+ struct bgp_dest *dest, struct attr *attr,
+ int add, struct bgp_path_info **ri,
+ int *route_changed)
{
struct bgp_path_info *tmp_pi = NULL;
struct bgp_path_info *local_pi = NULL; /* local route entry if any */
struct prefix_evpn *evp;
*ri = NULL;
- evp = (struct prefix_evpn *)&rn->p;
+ evp = (struct prefix_evpn *)&dest->p;
*route_changed = 1;
/* locate the local and remote entries if any */
- for (tmp_pi = bgp_dest_get_bgp_path_info(rn); tmp_pi;
+ for (tmp_pi = bgp_dest_get_bgp_path_info(dest); tmp_pi;
tmp_pi = tmp_pi->next) {
if (tmp_pi->peer == bgp->peer_self
&& tmp_pi->type == ZEBRA_ROUTE_BGP
/* Create new route with its attribute. */
tmp_pi = info_make(ZEBRA_ROUTE_BGP, BGP_ROUTE_STATIC, 0,
- bgp->peer_self, attr_new, rn);
+ bgp->peer_self, attr_new, dest);
SET_FLAG(tmp_pi->flags, BGP_PATH_VALID);
if (evp->prefix.route_type == BGP_EVPN_AD_ROUTE) {
}
/* add the newly created path to the route-node */
- bgp_path_info_add(rn, tmp_pi);
+ bgp_path_info_add(dest, tmp_pi);
} else {
tmp_pi = local_pi;
if (attrhash_cmp(tmp_pi->attr, attr)
* Add (or update) attribute to hash.
*/
attr_new = bgp_attr_intern(attr);
- bgp_path_info_set_flag(rn, tmp_pi,
- BGP_PATH_ATTR_CHANGED);
+ bgp_path_info_set_flag(dest, tmp_pi,
+ BGP_PATH_ATTR_CHANGED);
/* Restore route, if needed. */
if (CHECK_FLAG(tmp_pi->flags, BGP_PATH_REMOVED))
- bgp_path_info_restore(rn, tmp_pi);
+ bgp_path_info_restore(dest, tmp_pi);
/* Unintern existing, set to new. */
bgp_attr_unintern(&tmp_pi->attr);
afi_t afi = AFI_L2VPN;
safi_t safi = SAFI_EVPN;
struct bgp_path_info *pi;
- struct bgp_node *rn = NULL; /* rn in esi table */
- struct bgp_node *global_rn = NULL; /* rn in global table */
+ struct bgp_dest *dest = NULL; /* dest in esi table */
+ struct bgp_dest *global_dest = NULL; /* dest in global table */
struct bgp_table *rt_table;
struct prefix_rd *prd;
* If it doesn't exist, ther is nothing to do.
* Note: there is no RD here.
*/
- rn = bgp_node_lookup(rt_table, (struct prefix *)p);
- if (!rn)
+ dest = bgp_node_lookup(rt_table, (struct prefix *)p);
+ if (!dest)
return 0;
if (BGP_DEBUG(evpn_mh, EVPN_MH_RT))
/* Next, locate route node in the global EVPN routing table.
* Note that this table is a 2-level tree (RD-level + Prefix-level)
*/
- global_rn = bgp_global_evpn_node_lookup(bgp->rib[afi][safi], afi, safi,
- (const struct prefix_evpn *)p, prd);
- if (global_rn) {
+ global_dest =
+ bgp_global_evpn_node_lookup(bgp->rib[afi][safi], afi, safi,
+ (const struct prefix_evpn *)p, prd);
+ if (global_dest) {
/* Delete route entry in the global EVPN table. */
- delete_evpn_route_entry(bgp, afi, safi, global_rn, &pi);
+ delete_evpn_route_entry(bgp, afi, safi, global_dest, &pi);
/* Schedule for processing - withdraws to peers happen from
* this table.
*/
if (pi)
- bgp_process(bgp, global_rn, afi, safi);
- bgp_dest_unlock_node(global_rn);
+ bgp_process(bgp, global_dest, afi, safi);
+ bgp_dest_unlock_node(global_dest);
}
/*
* Delete route entry in the ESI or VNI routing table.
* This can just be removed.
*/
- delete_evpn_route_entry(bgp, afi, safi, rn, &pi);
+ delete_evpn_route_entry(bgp, afi, safi, dest, &pi);
if (pi)
- bgp_path_info_reap(rn, pi);
- bgp_dest_unlock_node(rn);
+ bgp_path_info_reap(dest, pi);
+ bgp_dest_unlock_node(dest);
return 0;
}
safi_t safi = SAFI_EVPN;
struct attr attr;
struct attr *attr_new = NULL;
- struct bgp_node *rn = NULL;
+ struct bgp_dest *dest = NULL;
struct bgp_path_info *pi = NULL;
memset(&attr, 0, sizeof(struct attr));
/* First, create (or fetch) route node within the ESI. */
/* NOTE: There is no RD here. */
- rn = bgp_node_get(es->route_table, (struct prefix *)p);
+ dest = bgp_node_get(es->route_table, (struct prefix *)p);
/* Create or update route entry. */
- ret = bgp_evpn_mh_route_update(bgp, es, NULL, afi, safi,
- rn, &attr, 1, &pi, &route_changed);
+ ret = bgp_evpn_mh_route_update(bgp, es, NULL, afi, safi, dest, &attr, 1,
+ &pi, &route_changed);
if (ret != 0) {
flog_err(EC_BGP_ES_INVALID,
"%u ERROR: Failed to updated ES route ESI: %s VTEP %s",
* this is just to set the flags correctly
* as local route in the ES always wins.
*/
- bgp_evpn_es_route_select_install(bgp, es, rn);
- bgp_dest_unlock_node(rn);
+ bgp_evpn_es_route_select_install(bgp, es, dest);
+ bgp_dest_unlock_node(dest);
/* If this is a new route or some attribute has changed, export the
* route to the global table. The route will be advertised to peers
if (route_changed) {
struct bgp_path_info *global_pi;
- rn = bgp_global_evpn_node_get(bgp->rib[afi][safi], afi, safi,
- p, &es->prd);
- bgp_evpn_mh_route_update(bgp, es, NULL, afi, safi,
- rn, attr_new, 1, &global_pi, &route_changed);
+ dest = bgp_global_evpn_node_get(bgp->rib[afi][safi], afi, safi,
+ p, &es->prd);
+ bgp_evpn_mh_route_update(bgp, es, NULL, afi, safi, dest,
+ attr_new, 1, &global_pi,
+ &route_changed);
/* Schedule for processing and unlock node. */
- bgp_process(bgp, rn, afi, safi);
- bgp_dest_unlock_node(rn);
+ bgp_process(bgp, dest, afi, safi);
+ bgp_dest_unlock_node(dest);
}
/* Unintern temporary. */
afi_t afi;
safi_t safi;
char buf[PREFIX_STRLEN];
- struct bgp_node *rd_rn, *rn;
+ struct bgp_dest *rd_dest, *dest;
struct bgp_table *table;
struct bgp_path_info *pi;
/* Walk entire global routing table and evaluate routes which could be
* imported into this Ethernet Segment.
*/
- for (rd_rn = bgp_table_top(bgp->rib[afi][safi]); rd_rn;
- rd_rn = bgp_route_next(rd_rn)) {
- table = bgp_dest_get_bgp_table_info(rd_rn);
+ for (rd_dest = bgp_table_top(bgp->rib[afi][safi]); rd_dest;
+ rd_dest = bgp_route_next(rd_dest)) {
+ table = bgp_dest_get_bgp_table_info(rd_dest);
if (!table)
continue;
- for (rn = bgp_table_top(table); rn; rn = bgp_route_next(rn)) {
- struct prefix_evpn *evp = (struct prefix_evpn *)&rn->p;
+ for (dest = bgp_table_top(table); dest;
+ dest = bgp_route_next(dest)) {
+ struct prefix_evpn *evp =
+ (struct prefix_evpn *)&dest->p;
- for (pi = bgp_dest_get_bgp_path_info(rn); pi;
- pi = pi->next) {
+ for (pi = bgp_dest_get_bgp_path_info(dest); pi;
+ pi = pi->next) {
/*
* Consider "valid" remote routes applicable for
* this ES.
safi_t safi = SAFI_EVPN;
struct attr attr;
struct attr *attr_new = NULL;
- struct bgp_node *rn = NULL;
+ struct bgp_dest *dest = NULL;
struct bgp_path_info *pi = NULL;
int route_changed = 0;
struct prefix_rd *global_rd;
bgp_evpn_type1_evi_route_extcomm_build(es, vpn, &attr);
/* First, create (or fetch) route node within the VNI. */
- rn = bgp_node_get(vpn->route_table, (struct prefix *)p);
+ dest = bgp_node_get(vpn->route_table, (struct prefix *)p);
/* Create or update route entry. */
- ret = bgp_evpn_mh_route_update(bgp, es, vpn, afi, safi,
- rn, &attr, 1, &pi, &route_changed);
+ ret = bgp_evpn_mh_route_update(bgp, es, vpn, afi, safi, dest,
+ &attr, 1, &pi, &route_changed);
if (ret != 0) {
flog_err(EC_BGP_ES_INVALID,
"%u Failed to update EAD-EVI route ESI: %s VNI %u VTEP %s",
/* First, create (or fetch) route node within the ES. */
/* NOTE: There is no RD here. */
/* XXX: fragment ID must be included as a part of the prefix. */
- rn = bgp_node_get(es->route_table, (struct prefix *)p);
+ dest = bgp_node_get(es->route_table, (struct prefix *)p);
/* Create or update route entry. */
- ret = bgp_evpn_mh_route_update(bgp, es, vpn, afi, safi,
- rn, &attr, 1, &pi, &route_changed);
+ ret = bgp_evpn_mh_route_update(bgp, es, vpn, afi, safi, dest,
+ &attr, 1, &pi, &route_changed);
if (ret != 0) {
flog_err(EC_BGP_ES_INVALID,
"%u ERROR: Failed to updated EAD-EVI route ESI: %s VTEP %s",
* this is just to set the flags correctly as local route in
* the ES always wins.
*/
- evpn_route_select_install(bgp, vpn, rn);
- bgp_dest_unlock_node(rn);
+ evpn_route_select_install(bgp, vpn, dest);
+ bgp_dest_unlock_node(dest);
/* If this is a new route or some attribute has changed, export the
* route to the global table. The route will be advertised to peers
if (route_changed) {
struct bgp_path_info *global_pi;
- rn = bgp_global_evpn_node_get(bgp->rib[afi][safi], afi, safi,
- p, global_rd);
- bgp_evpn_mh_route_update(bgp, es, vpn, afi, safi,
- rn, attr_new, 1, &global_pi, &route_changed);
+ dest = bgp_global_evpn_node_get(bgp->rib[afi][safi], afi, safi,
+ p, global_rd);
+ bgp_evpn_mh_route_update(bgp, es, vpn, afi, safi, dest,
+ attr_new, 1, &global_pi,
+ &route_changed);
/* Schedule for processing and unlock node. */
- bgp_process(bgp, rn, afi, safi);
- bgp_dest_unlock_node(rn);
+ bgp_process(bgp, dest, afi, safi);
+ bgp_dest_unlock_node(dest);
}
/* Unintern temporary. */