]> git.puffer.fish Git - mirror/frr.git/commitdiff
Revert "bgpd: Reinstall aggregated routes if using route-maps and it was changed"
authorEnke Chen <enchen@paloaltonetworks.com>
Wed, 8 Jan 2025 17:12:56 +0000 (09:12 -0800)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Tue, 14 Jan 2025 15:13:35 +0000 (15:13 +0000)
This reverts commit ee1986f1b5ae6b94b446b12e1b77cc30d8f5f46d.

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 <enchen@paloaltonetworks.com>
(cherry picked from commit 74c9d89aaf3df1b583de341169c4cb77eaa1b3b4)

bgpd/bgp_route.c
bgpd/bgp_route.h
bgpd/bgp_routemap.c

index 12397e87e37cbac73f1ad9e37bec11e0fb592898..3e6c846c1746be90f4e88c0559b10b612779e313 100644 (file)
@@ -7718,9 +7718,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)
@@ -8712,7 +8711,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);
        }
 
index efabbc798007e17466962d1f8cead59625ef36e2..ffae6995fe805e714c780693f586b11d707306f0 100644 (file)
@@ -432,7 +432,6 @@ struct bgp_aggregate {
        struct {
                char *name;
                struct route_map *map;
-               bool changed;
        } rmap;
 
        /* Suppress-count. */
index aab04cb277ed1c8e781f675061e3f6c4ab7bfc5b..261b7d240cc8ee447f3162bbbc1f1d34d6fab45b 100644 (file)
@@ -4616,7 +4616,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;
                        }