mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 10:08:41 +00:00
Revert "bgpd: fix missing delete from the list in dampening"
This reverts commit 755a977b8a
.
This commit is contained in:
parent
b3aa2ed7a8
commit
253b4c5fd4
@ -227,6 +227,7 @@ 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);
|
||||
} else {
|
||||
bdi->index = BGP_DAMP_NO_REUSE_LIST_INDEX;
|
||||
@ -375,8 +376,10 @@ int bgp_damp_update(struct bgp_path_info *path, struct bgp_dest *dest,
|
||||
|
||||
if (bdi->penalty > bdc->reuse_limit / 2.0)
|
||||
bdi->t_updated = t_now;
|
||||
else
|
||||
else {
|
||||
bgp_damp_info_unclaim(bdi);
|
||||
bgp_damp_info_free(bdi, 0);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
@ -385,8 +388,6 @@ void bgp_damp_info_free(struct bgp_damp_info *bdi, int withdraw)
|
||||
{
|
||||
assert(bdi);
|
||||
|
||||
bgp_damp_info_unclaim(bdi);
|
||||
|
||||
bdi->path->extra->damp_info = NULL;
|
||||
bgp_path_info_unset_flag(bdi->dest, bdi->path,
|
||||
BGP_PATH_HISTORY | BGP_PATH_DAMPED);
|
||||
@ -504,12 +505,15 @@ void bgp_damp_info_clean(struct bgp *bgp, struct bgp_damp_config *bdc,
|
||||
bgp_process(bgp, bdi->dest, bdi->afi,
|
||||
bdi->safi);
|
||||
}
|
||||
bgp_reuselist_del(list, bdi);
|
||||
bgp_damp_info_free(bdi, 1);
|
||||
}
|
||||
}
|
||||
|
||||
while ((bdi = SLIST_FIRST(&bdc->no_reuse_list)) != NULL)
|
||||
while ((bdi = SLIST_FIRST(&bdc->no_reuse_list)) != NULL) {
|
||||
bgp_reuselist_del(&bdc->no_reuse_list, bdi);
|
||||
bgp_damp_info_free(bdi, 1);
|
||||
}
|
||||
|
||||
/* Free decay array */
|
||||
XFREE(MTYPE_BGP_DAMP_ARRAY, bdc->decay_array);
|
||||
|
Loading…
Reference in New Issue
Block a user