0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-23 02:01:55 +00:00

Fixed in-table route refresh counter to not randomly add 256

This commit is contained in:
Maria Matejka 2024-04-09 19:14:30 +02:00 committed by Katerina Kubecova
parent 8408d5c4e1
commit aee44d1ef0

View File

@ -2021,7 +2021,7 @@ rt_stop_import(struct rt_import_request *req, void (*stopped)(struct rt_import_r
/* Cancel table rr_counter */
if (hook->stale_set != hook->stale_pruned)
tab->rr_counter -= (hook->stale_set - hook->stale_pruned);
tab->rr_counter -= ((int) hook->stale_set - (int) hook->stale_pruned);
tab->rr_counter++;
@ -2299,7 +2299,7 @@ rt_refresh_begin(struct rt_import_request *req)
e->stale_cycle = 0;
/* Smash the route refresh counter and zero everything. */
tab->rr_counter -= hook->stale_set - hook->stale_pruned;
tab->rr_counter -= ((int) hook->stale_set - (int) hook->stale_pruned);
hook->stale_set = hook->stale_valid = hook->stale_pruning = hook->stale_pruned = 0;
}
@ -3033,7 +3033,7 @@ rt_prune_table(struct rtable_private *tab)
}
else if (ih->stale_pruning != ih->stale_pruned)
{
tab->rr_counter -= (ih->stale_pruning - ih->stale_pruned);
tab->rr_counter -= ((int) ih->stale_pruning - (int) ih->stale_pruned);
ih->stale_pruned = ih->stale_pruning;
rt_refresh_trace(tab, ih, "table prune after refresh end");
}