diff options
author | Donald Sharp <donaldsharp72@gmail.com> | 2025-01-15 13:37:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-15 13:37:12 +0100 |
commit | e9bd124149ffbb2150b1766298c2c09cbe5fd06b (patch) | |
tree | b43cb8709a1571d7b4a26b2fad847e46d335d4e0 | |
parent | Merge pull request #17796 from LabNConsulting/chopps/datastore-notifications (diff) | |
parent | bgpd: move bgp_aggregate_increment() after bgp_path_info_add() (diff) | |
download | frr-e9bd124149ffbb2150b1766298c2c09cbe5fd06b.tar.xz frr-e9bd124149ffbb2150b1766298c2c09cbe5fd06b.zip |
Merge pull request #17858 from enkechen-panw/aggr-fix5
bgpd: move bgp_aggregate_increment() after bgp_path_info_add()
-rw-r--r-- | bgpd/bgp_mplsvpn.c | 2 | ||||
-rw-r--r-- | bgpd/bgp_route.c | 14 | ||||
-rw-r--r-- | bgpd/rfapi/rfapi.c | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index 1d10831ca..46e529f03 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -1312,8 +1312,8 @@ leak_update(struct bgp *to_bgp, struct bgp_dest *bn, else bgp_path_info_unset_flag(bn, new, BGP_PATH_VALID); - bgp_aggregate_increment(to_bgp, p, new, afi, safi); bgp_path_info_add(bn, new); + bgp_aggregate_increment(to_bgp, p, new, afi, safi); bgp_process(to_bgp, bn, new, afi, safi); diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 2a7ccd7ee..c02638a5b 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -5592,12 +5592,12 @@ void bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id, /* Addpath ID */ new->addpath_rx_id = addpath_id; - /* Increment prefix */ - bgp_aggregate_increment(bgp, p, new, afi, safi); - /* Register new BGP information. */ bgp_path_info_add(dest, new); + /* Increment prefix */ + bgp_aggregate_increment(bgp, p, new, afi, safi); + /* route_node_get lock */ bgp_dest_unlock_node(dest); @@ -7186,12 +7186,12 @@ void bgp_static_update(struct bgp *bgp, const struct prefix *p, bgp_nexthop_reachability_check(afi, safi, new, p, dest, bgp, bgp); - /* Aggregate address increment. */ - bgp_aggregate_increment(bgp, p, new, afi, safi); - /* Register new BGP information. */ bgp_path_info_add(dest, new); + /* Aggregate address increment. */ + bgp_aggregate_increment(bgp, p, new, afi, safi); + /* route_node_get lock */ bgp_dest_unlock_node(dest); @@ -9336,8 +9336,8 @@ void bgp_redistribute_add(struct bgp *bgp, struct prefix *p, bgp->peer_self, new_attr, bn); SET_FLAG(new->flags, BGP_PATH_VALID); - bgp_aggregate_increment(bgp, p, new, afi, SAFI_UNICAST); bgp_path_info_add(bn, new); + bgp_aggregate_increment(bgp, p, new, afi, SAFI_UNICAST); bgp_dest_unlock_node(bn); SET_FLAG(bn->flags, BGP_NODE_FIB_INSTALLED); bgp_process(bgp, bn, new, afi, SAFI_UNICAST); diff --git a/bgpd/rfapi/rfapi.c b/bgpd/rfapi/rfapi.c index 61d154f1b..241cbcb35 100644 --- a/bgpd/rfapi/rfapi.c +++ b/bgpd/rfapi/rfapi.c @@ -1029,8 +1029,8 @@ void add_vnc_route(struct rfapi_descriptor *rfd, /* cookie, VPN UN addr, peer */ rfapiPrintBi(NULL, new); } - bgp_aggregate_increment(bgp, p, new, afi, safi); bgp_path_info_add(bn, new); + bgp_aggregate_increment(bgp, p, new, afi, safi); if (safi == SAFI_MPLS_VPN) { struct bgp_dest *pdest = NULL; |