]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: fix aggregate route unsuppression bug
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Mon, 27 Dec 2021 18:10:30 +0000 (15:10 -0300)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Tue, 11 Jan 2022 16:44:54 +0000 (13:44 -0300)
Unsuppress route part of the aggregation when route-map configuration
is removed before the aggregation itself.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
bgpd/bgp_route.c

index 3836d5f24bc16e13a0e7d3a14db3391dfdf3de2d..73b7275465ce6d5c73280a660e14d9d692a39784 100644 (file)
@@ -7561,15 +7561,14 @@ void bgp_aggregate_delete(struct bgp *bgp, const struct prefix *p, afi_t afi,
                        if (pi->sub_type == BGP_ROUTE_AGGREGATE)
                                continue;
 
-                       if (aggregate->summary_only && pi->extra
-                           && AGGREGATE_MED_VALID(aggregate)) {
-                               if (aggr_unsuppress_path(aggregate, pi))
-                                       match++;
-                       }
-
-                       if (aggregate->suppress_map_name
-                           && AGGREGATE_MED_VALID(aggregate)
-                           && aggr_suppress_map_test(bgp, aggregate, pi)) {
+                       /*
+                        * This route is suppressed: attempt to unsuppress it.
+                        *
+                        * `aggr_unsuppress_path` will fail if this particular
+                        * aggregate route was not the suppressor.
+                        */
+                       if (pi->extra && pi->extra->aggr_suppressors &&
+                           listcount(pi->extra->aggr_suppressors)) {
                                if (aggr_unsuppress_path(aggregate, pi))
                                        match++;
                        }