]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: solve issue entering aggregate twice 3104/head
authorDon Slice <dslice@cumulusnetworks.com>
Fri, 28 Sep 2018 15:55:39 +0000 (15:55 +0000)
committerDon Slice <dslice@cumulusnetworks.com>
Fri, 28 Sep 2018 16:03:42 +0000 (16:03 +0000)
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 a04ed8eef53489a19eb10cfadf00e830241950c2..c5087582041e9e92c82b589f815db774409937f6 100644 (file)
@@ -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;
 }