diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 3bbbdee161..910fa97493 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -8015,6 +8015,9 @@ static void bgp_aggregate_install( bgp_process(bgp, dest, new, afi, safi); if (debug) zlog_debug(" aggregate %pFX: installed", p); + if (SAFI_UNICAST == safi && (bgp->inst_type == BGP_INSTANCE_TYPE_VRF || + bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)) + vpn_leak_from_vrf_update(bgp_get_default(), bgp, new); } else { uninstall_aggregate_route: /* Withdraw the aggregate route from routing table. */ @@ -8023,6 +8026,11 @@ static void bgp_aggregate_install( bgp_process(bgp, dest, pi, afi, safi); if (debug) zlog_debug(" aggregate %pFX: uninstall", p); + if (SAFI_UNICAST == safi && + (bgp->inst_type == BGP_INSTANCE_TYPE_VRF || + bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)) { + vpn_leak_from_vrf_withdraw(bgp_get_default(), bgp, pi); + } } }