diff options
author | sudhanshukumar22 <sudhanshu.kumar@broadcom.com> | 2020-11-03 07:36:31 +0100 |
---|---|---|
committer | sudhanshukumar22 <sudhanshu.kumar@broadcom.com> | 2021-02-02 12:16:04 +0100 |
commit | c8ddbd48040be6bf33c4f0ab3e470f290f9b165a (patch) | |
tree | 0f66e136fc5227b8bf6789dfc759100d1dfb71d7 /bgpd/bgp_damp.c | |
parent | Merge pull request #7985 from donaldsharp/eigrp_uninited (diff) | |
download | frr-c8ddbd48040be6bf33c4f0ab3e470f290f9b165a.tar.xz frr-c8ddbd48040be6bf33c4f0ab3e470f290f9b165a.zip |
bgpd: clear ip bgp dampening was not triggering the route calculation for the prefix
Description:
clear ip bgp dampening was not triggering the route
calculation for the prefix, Due to this prefix are not install in
RIB(Zebra) and not adv to neighbor
Problem Description/Summary :
clear ip bgp dampening was not triggering the route
calculation for the prefix, Due to this prefix are not install in
RIB(Zebra) and not adv to neighbor
Fix: When clear ip bgp dampening, route are put for route-calculation as
that it is install in the Zebra and adv to neighbor.
Signed-off-by: sudhanshukumar22 <sudhanshu.kumar@broadcom.com>
Diffstat (limited to 'bgpd/bgp_damp.c')
-rw-r--r-- | bgpd/bgp_damp.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/bgpd/bgp_damp.c b/bgpd/bgp_damp.c index b740979b8..3db142b8c 100644 --- a/bgpd/bgp_damp.c +++ b/bgpd/bgp_damp.c @@ -545,7 +545,8 @@ int bgp_damp_enable(struct bgp *bgp, afi_t afi, safi_t safi, time_t half, } /* Clean all the bgp_damp_info stored in reuse_list and no_reuse_list. */ -void bgp_damp_info_clean(struct bgp_damp_config *bdc, afi_t afi, safi_t safi) +void bgp_damp_info_clean(struct bgp *bgp, struct bgp_damp_config *bdc, + afi_t afi, safi_t safi) { struct bgp_damp_info *bdi; struct reuselist_node *rn; @@ -557,6 +558,13 @@ void bgp_damp_info_clean(struct bgp_damp_config *bdc, afi_t afi, safi_t safi) list = &bdc->reuse_list[i]; while ((rn = SLIST_FIRST(list)) != NULL) { bdi = rn->info; + if (bdi->lastrecord == BGP_RECORD_UPDATE) { + bgp_aggregate_increment(bgp, &bdi->dest->p, + bdi->path, bdi->afi, + bdi->safi); + bgp_process(bgp, bdi->dest, bdi->afi, + bdi->safi); + } bgp_reuselist_del(list, &rn); bgp_damp_info_free(&bdi, bdc, 1, afi, safi); } @@ -607,7 +615,7 @@ int bgp_damp_disable(struct bgp *bgp, afi_t afi, safi_t safi) thread_cancel(&bdc->t_reuse); /* Clean BGP dampening information. */ - bgp_damp_info_clean(bdc, afi, safi); + bgp_damp_info_clean(bgp, bdc, afi, safi); UNSET_FLAG(bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING); @@ -896,7 +904,7 @@ void bgp_peer_damp_disable(struct peer *peer, afi_t afi, safi_t safi) bdc = &peer->damp[afi][safi]; if (!bdc) return; - bgp_damp_info_clean(bdc, afi, safi); + bgp_damp_info_clean(peer->bgp, bdc, afi, safi); UNSET_FLAG(peer->af_flags[afi][safi], PEER_FLAG_CONFIG_DAMPENING); } |