diff options
author | Igor Ryzhov <iryzhov@nfware.com> | 2021-08-02 12:01:06 +0200 |
---|---|---|
committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-08-03 20:54:47 +0200 |
commit | 5c8846f6e8971f942447ad2d177e8c3cf1a2433d (patch) | |
tree | 4157bb702ea2428fc742265f38d65259b0415de5 /bgpd/bgp_damp.c | |
parent | Revert "bgpd: fix missing damp info free when cleaning bgp path" (diff) | |
download | frr-5c8846f6e8971f942447ad2d177e8c3cf1a2433d.tar.xz frr-5c8846f6e8971f942447ad2d177e8c3cf1a2433d.zip |
Revert "bgpd: cleanup bgp_damp_info_free"
This reverts commit 97766ac8aa40ff8868a854ba8515c9e6441e4b7c.
Diffstat (limited to 'bgpd/bgp_damp.c')
-rw-r--r-- | bgpd/bgp_damp.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/bgpd/bgp_damp.c b/bgpd/bgp_damp.c index dd9de5dc9..bf61d7358 100644 --- a/bgpd/bgp_damp.c +++ b/bgpd/bgp_damp.c @@ -228,7 +228,8 @@ static int bgp_reuse_timer(struct thread *t) if (bdi->penalty <= bdc->reuse_limit / 2.0) { bgp_reuselist_del(&plist, bdi); - bgp_damp_info_free(bdi, 1); + bgp_damp_info_free(bdi, bdc, 1, bdi->afi, + bdi->safi); } else { bdi->index = BGP_DAMP_NO_REUSE_LIST_INDEX; bgp_reuselist_switch(&plist, bdi, @@ -378,15 +379,16 @@ int bgp_damp_update(struct bgp_path_info *path, struct bgp_dest *dest, bdi->t_updated = t_now; else { bgp_damp_info_unclaim(bdi); - bgp_damp_info_free(bdi, 0); + bgp_damp_info_free(bdi, bdc, 0, afi, safi); } return status; } -void bgp_damp_info_free(struct bgp_damp_info *bdi, int withdraw) +void bgp_damp_info_free(struct bgp_damp_info *bdi, struct bgp_damp_config *bdc, + int withdraw, afi_t afi, safi_t safi) { - assert(bdi); + assert(bdc && bdi); if (bdi->path == NULL) { XFREE(MTYPE_BGP_DAMP_INFO, bdi); @@ -509,13 +511,13 @@ void bgp_damp_info_clean(struct bgp *bgp, struct bgp_damp_config *bdc, bdi->safi); } bgp_reuselist_del(list, bdi); - bgp_damp_info_free(bdi, 1); + bgp_damp_info_free(bdi, bdc, 1, afi, safi); } } while ((bdi = SLIST_FIRST(&bdc->no_reuse_list)) != NULL) { bgp_reuselist_del(&bdc->no_reuse_list, bdi); - bgp_damp_info_free(bdi, 1); + bgp_damp_info_free(bdi, bdc, 1, afi, safi); } /* Free decay array */ |