mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-28 12:10:24 +00:00
bgpd: Modify update_evpn_type5_route_entry to include path_info pointer
Modify update_evpn_type5_route_entry to return a pointer to the struct bgp_path_info modified in this function. This code merely follows the standards used in other bgp_evpn.c code where the update function returns the pointer to the path info. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
829a2e9bc4
commit
f4fd5c8e36
@ -1561,7 +1561,8 @@ static struct bgp_path_info *bgp_evpn_route_get_local_path(
|
||||
static int update_evpn_type5_route_entry(struct bgp *bgp_evpn,
|
||||
struct bgp *bgp_vrf, afi_t afi,
|
||||
safi_t safi, struct bgp_dest *dest,
|
||||
struct attr *attr, int *route_changed)
|
||||
struct attr *attr, int *route_changed,
|
||||
struct bgp_path_info **entry)
|
||||
{
|
||||
struct attr *attr_new = NULL;
|
||||
struct bgp_path_info *pi = NULL;
|
||||
@ -1599,8 +1600,8 @@ static int update_evpn_type5_route_entry(struct bgp *bgp_evpn,
|
||||
|
||||
/* add the route entry to route node*/
|
||||
bgp_path_info_add(dest, pi);
|
||||
*entry = pi;
|
||||
} else {
|
||||
|
||||
tmp_pi = local_pi;
|
||||
if (!attrhash_cmp(tmp_pi->attr, attr)) {
|
||||
|
||||
@ -1622,6 +1623,7 @@ static int update_evpn_type5_route_entry(struct bgp *bgp_evpn,
|
||||
tmp_pi->attr = attr_new;
|
||||
tmp_pi->uptime = monotime(NULL);
|
||||
}
|
||||
*entry = local_pi;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -1637,6 +1639,7 @@ static int update_evpn_type5_route(struct bgp *bgp_vrf, struct prefix_evpn *evp,
|
||||
struct bgp_dest *dest = NULL;
|
||||
struct bgp *bgp_evpn = NULL;
|
||||
int route_changed = 0;
|
||||
struct bgp_path_info *pi = NULL;
|
||||
|
||||
bgp_evpn = bgp_get_evpn();
|
||||
if (!bgp_evpn)
|
||||
@ -1718,7 +1721,7 @@ static int update_evpn_type5_route(struct bgp *bgp_vrf, struct prefix_evpn *evp,
|
||||
|
||||
/* create or update the route entry within the route node */
|
||||
update_evpn_type5_route_entry(bgp_evpn, bgp_vrf, afi, safi, dest, &attr,
|
||||
&route_changed);
|
||||
&route_changed, &pi);
|
||||
|
||||
/* schedule for processing and unlock node */
|
||||
if (route_changed) {
|
||||
|
Loading…
Reference in New Issue
Block a user