diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2022-01-12 23:18:58 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-12 23:18:58 +0200 |
| commit | 83fc30745dacdfcb8f7e3d9848500aa0a0de57ea (patch) | |
| tree | c1e7e973015c1f7a0a9821d95aeca9c7143cc061 | |
| parent | 25b9371c82b4ea5447d8d04de4c2198137464a70 (diff) | |
| parent | 92b175bd4037222e26be1f2639837bee1e200630 (diff) | |
Merge pull request #10266 from opensourcerouting/bgp-aggr-rm
bgpd: fix aggregate route unsuppression bug
| -rw-r--r-- | bgpd/bgp_route.c | 17 |
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++; } |
