]> git.puffer.fish Git - matthieu/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)
committermergify-bot <noreply@mergify.com>
Thu, 13 Jan 2022 10:54:43 +0000 (10:54 +0000)
Unsuppress route part of the aggregation when route-map configuration
is removed before the aggregation itself.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
(cherry picked from commit 92b175bd4037222e26be1f2639837bee1e200630)

bgpd/bgp_route.c

index 6ad1e2b701d9ce396f0538cf3ba55dc1adad503a..00cea67e152d28ab9c264c4ae346083eefffa7d6 100644 (file)
@@ -7382,15 +7382,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++;
                        }