]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: solve issue entering aggregate twice
authorDon Slice <dslice@cumulusnetworks.com>
Fri, 28 Sep 2018 15:55:39 +0000 (15:55 +0000)
committerDonatas Abraitis <donatas.abraitis@gmail.com>
Thu, 11 Jul 2019 19:36:21 +0000 (22:36 +0300)
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 <dslice@cumulusnetworks.com>
bgpd/bgp_route.c

index 96fcbd09de79729146c892e45ba487115d069399..5094860f03339f5f8a850f9228d405430fa73dd9 100644 (file)
@@ -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;
 }