From: Don Slice Date: Thu, 27 Sep 2018 16:51:59 +0000 (+0000) Subject: bgpd: enable aggregation in evpn X-Git-Tag: frr-7.1-dev~314^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=b49cdf4c379bb7b4059faea4ce4582e6ab29ce50;p=mirror%2Ffrr.git bgpd: enable aggregation in evpn 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 --- diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c index 41aceae9f7..744f07d86a 100644 --- a/bgpd/bgp_evpn.c +++ b/bgpd/bgp_evpn.c @@ -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);