Skip to content

Commit

Permalink
Revert "bgpd: Reinstall aggregated routes if using route-maps and it …
Browse files Browse the repository at this point in the history
…was changed"

This reverts commit ee1986f.

The fix is incomplete, and is no longer needed with the fix that applies
the route-map for an aggregate and then compares the attribute.

Signed-off-by: Enke Chen <[email protected]>
  • Loading branch information
enkechen-panw committed Jan 8, 2025
1 parent 3d7dbcf commit b0f96fc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
6 changes: 2 additions & 4 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -8008,9 +8008,8 @@ static void bgp_aggregate_install(
* If the aggregate information has not changed
* no need to re-install it again.
*/
if (pi && (!aggregate->rmap.changed &&
bgp_aggregate_info_same(pi, origin, aspath, community,
ecommunity, lcommunity))) {
if (pi && bgp_aggregate_info_same(pi, origin, aspath, community,
ecommunity, lcommunity)) {
bgp_dest_unlock_node(dest);

if (aspath)
Expand Down Expand Up @@ -9010,7 +9009,6 @@ static int bgp_aggregate_set(struct vty *vty, const char *prefix_str, afi_t afi,
aggregate->rmap.name =
XSTRDUP(MTYPE_ROUTE_MAP_NAME, rmap);
aggregate->rmap.map = route_map_lookup_by_name(rmap);
aggregate->rmap.changed = true;
route_map_counter_increment(aggregate->rmap.map);
}

Expand Down
1 change: 0 additions & 1 deletion bgpd/bgp_route.h
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,6 @@ struct bgp_aggregate {
struct {
char *name;
struct route_map *map;
bool changed;
} rmap;

/* Suppress-count. */
Expand Down
1 change: 0 additions & 1 deletion bgpd/bgp_routemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -4684,7 +4684,6 @@ static void bgp_route_map_process_update(struct bgp *bgp, const char *rmap_name,
route_map_counter_increment(map);

aggregate->rmap.map = map;
aggregate->rmap.changed = true;

matched = true;
}
Expand Down

0 comments on commit b0f96fc

Please sign in to comment.