/* if (figure-of-merit < reuse). */
if (bdi->penalty < damp->reuse_limit) {
/* Reuse the route. */
- bgp_info_unset_flag(bdi->rn, bdi->binfo,
- BGP_PATH_DAMPED);
+ bgp_path_info_unset_flag(bdi->rn, bdi->binfo,
+ BGP_PATH_DAMPED);
bdi->suppress_time = 0;
if (bdi->lastrecord == BGP_RECORD_UPDATE) {
- bgp_info_unset_flag(bdi->rn, bdi->binfo,
- BGP_PATH_HISTORY);
+ bgp_path_info_unset_flag(bdi->rn, bdi->binfo,
+ BGP_PATH_HISTORY);
bgp_aggregate_increment(bgp, &bdi->rn->p,
bdi->binfo, bdi->afi,
bdi->safi);
bdi->index = -1;
bdi->afi = afi;
bdi->safi = safi;
- (bgp_info_extra_get(binfo))->damp_info = bdi;
+ (bgp_path_info_extra_get(binfo))->damp_info = bdi;
BGP_DAMP_LIST_ADD(damp, bdi);
} else {
last_penalty = bdi->penalty;
bdi->t_updated = t_now;
/* Make this route as historical status. */
- bgp_info_set_flag(rn, binfo, BGP_PATH_HISTORY);
+ bgp_path_info_set_flag(rn, binfo, BGP_PATH_HISTORY);
/* Remove the route from a reuse list if it is on one. */
if (CHECK_FLAG(bdi->binfo->flags, BGP_PATH_DAMPED)) {
/* If not suppressed before, do annonunce this withdraw and
insert into reuse_list. */
if (bdi->penalty >= damp->suppress_value) {
- bgp_info_set_flag(rn, binfo, BGP_PATH_DAMPED);
+ bgp_path_info_set_flag(rn, binfo, BGP_PATH_DAMPED);
bdi->suppress_time = t_now;
BGP_DAMP_LIST_DEL(damp, bdi);
bgp_reuse_list_add(bdi);
return BGP_DAMP_USED;
t_now = bgp_clock();
- bgp_info_unset_flag(rn, binfo, BGP_PATH_HISTORY);
+ bgp_path_info_unset_flag(rn, binfo, BGP_PATH_HISTORY);
bdi->lastrecord = BGP_RECORD_UPDATE;
bdi->penalty = bgp_damp_decay(t_now - bdi->t_updated, bdi->penalty);
status = BGP_DAMP_USED;
else if (CHECK_FLAG(bdi->binfo->flags, BGP_PATH_DAMPED)
&& (bdi->penalty < damp->reuse_limit)) {
- bgp_info_unset_flag(rn, binfo, BGP_PATH_DAMPED);
+ bgp_path_info_unset_flag(rn, binfo, BGP_PATH_DAMPED);
bgp_reuse_list_delete(bdi);
BGP_DAMP_LIST_ADD(damp, bdi);
bdi->suppress_time = 0;
t_diff = t_now - bdi->suppress_time;
if (t_diff >= damp->max_suppress_time) {
- bgp_info_unset_flag(bdi->rn, binfo, BGP_PATH_DAMPED);
+ bgp_path_info_unset_flag(bdi->rn, binfo,
+ BGP_PATH_DAMPED);
bgp_reuse_list_delete(bdi);
BGP_DAMP_LIST_ADD(damp, bdi);
bdi->penalty = damp->reuse_limit;
else
BGP_DAMP_LIST_DEL(damp, bdi);
- bgp_info_unset_flag(bdi->rn, binfo, BGP_PATH_HISTORY | BGP_PATH_DAMPED);
+ bgp_path_info_unset_flag(bdi->rn, binfo,
+ BGP_PATH_HISTORY | BGP_PATH_DAMPED);
if (bdi->lastrecord == BGP_RECORD_WITHDRAW && withdraw)
- bgp_info_delete(bdi->rn, binfo);
+ bgp_path_info_delete(bdi->rn, binfo);
XFREE(MTYPE_BGP_DAMP_INFO, bdi);
}