summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_route.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 5318ee28ee..e821c83ab3 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -7552,15 +7552,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++;
}