From: Maria Matejka Date: Tue, 9 Apr 2024 17:14:30 +0000 (+0200) Subject: Fixed in-table route refresh counter to not randomly add 256 X-Git-Tag: v3.0.0~246^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e55a8168a992c61799a1458abfb8f16e0a30753;p=thirdparty%2Fbird.git Fixed in-table route refresh counter to not randomly add 256 --- diff --git a/nest/rt-table.c b/nest/rt-table.c index 0dda2588a..6a6820692 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -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"); }