From: Don Slice Date: Fri, 28 Sep 2018 15:55:39 +0000 (+0000) Subject: bgpd: solve issue entering aggregate twice X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=a3a07f2dcf50aac9a933f2550d2a266918351ed3;p=matthieu%2Ffrr.git bgpd: solve issue entering aggregate twice Problem reported that frr-relaod.py was not installing an aggregate properly. Problem was actually that frr-reload.py does the command twice, and the second time the aggregate command was entered, it would appear in the config but the aggregate was removed from the bgp table and not advertised to peers. Solved by noticing when an aggregate was marked for deletion (info_invalid) and allowing the re-entry if the old one was being removed. Ticket: CM-22509 Signed-off-by: Don Slice --- diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 96fcbd09de..5094860f03 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -5481,6 +5481,9 @@ static int bgp_aggregate_info_same(struct bgp_info *ri, uint8_t origin, if (!community_cmp(ri->attr->community, comm)) return 0; + if (!CHECK_FLAG(ri->flags, BGP_INFO_VALID)) + return 0; + return 1; }