From 7ce8a8e022689140cbda219ec65a36f3b78a3518 Mon Sep 17 00:00:00 2001 From: Don Slice Date: Fri, 28 Sep 2018 15:55:39 +0000 Subject: [PATCH] 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 --- bgpd/bgp_route.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index a04ed8eef5..c508758204 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -5478,6 +5478,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; } -- 2.39.5