diff options
Diffstat (limited to 'bgpd/bgp_damp.c')
| -rw-r--r-- | bgpd/bgp_damp.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/bgpd/bgp_damp.c b/bgpd/bgp_damp.c index fd7192a6f9..32ba6002b6 100644 --- a/bgpd/bgp_damp.c +++ b/bgpd/bgp_damp.c @@ -145,13 +145,13 @@ static int bgp_reuse_timer(struct thread *t) /* 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); @@ -205,7 +205,7 @@ int bgp_damp_withdraw(struct bgp_path_info *binfo, struct bgp_node *rn, 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; @@ -228,7 +228,7 @@ int bgp_damp_withdraw(struct bgp_path_info *binfo, struct bgp_node *rn, 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)) { @@ -243,7 +243,7 @@ int bgp_damp_withdraw(struct bgp_path_info *binfo, struct bgp_node *rn, /* 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); @@ -263,7 +263,7 @@ int bgp_damp_update(struct bgp_path_info *binfo, struct bgp_node *rn, afi_t afi, 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); @@ -273,7 +273,7 @@ int bgp_damp_update(struct bgp_path_info *binfo, struct bgp_node *rn, afi_t afi, 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; @@ -304,7 +304,8 @@ int bgp_damp_scan(struct bgp_path_info *binfo, afi_t afi, safi_t safi) 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; @@ -347,10 +348,11 @@ void bgp_damp_info_free(struct bgp_damp_info *bdi, int withdraw) 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); } |
