]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: enable aggregation in evpn
authorDon Slice <dslice@cumulusnetworks.com>
Thu, 27 Sep 2018 16:51:59 +0000 (16:51 +0000)
committerDon Slice <dslice@cumulusnetworks.com>
Fri, 28 Sep 2018 15:01:17 +0000 (15:01 +0000)
Problem encountered where using the aggregate-address command in an
evpn environment did not work properly.  Depending on the order of
actions, the aggregate may not be created or removed when either the
commands were issued or routes come and go.

Ticket: CM-20585
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
bgpd/bgp_evpn.c

index 41aceae9f7b56fc51edb292d1fce7ba6ebea2f09..744f07d86aee69911cad08b96987b46c73d74e82 100644 (file)
@@ -2428,6 +2428,8 @@ static int install_evpn_route_entry_in_vrf(struct bgp *bgp_vrf,
                ri->uptime = bgp_clock();
        }
 
+       bgp_aggregate_increment(bgp_vrf, &rn->p, ri, afi, safi);
+
        /* Perform route selection and update zebra, if required. */
        bgp_process(bgp_vrf, rn, afi, safi);
 
@@ -2600,6 +2602,8 @@ static int uninstall_evpn_route_entry_in_vrf(struct bgp *bgp_vrf,
        /* Mark entry for deletion */
        bgp_info_delete(rn, ri);
 
+       bgp_aggregate_decrement(bgp_vrf, &rn->p, ri, afi, safi);
+
        /* Perform route selection and update zebra, if required. */
        bgp_process(bgp_vrf, rn, afi, safi);