summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hicn-light/src/strategies/loadBalancer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hicn-light/src/strategies/loadBalancer.c b/hicn-light/src/strategies/loadBalancer.c
index 5be6a0182..8dda98603 100644
--- a/hicn-light/src/strategies/loadBalancer.c
+++ b/hicn-light/src/strategies/loadBalancer.c
@@ -120,7 +120,7 @@ static unsigned _select_Nexthop(StrategyLoadBalancer *strategy) {
double w = strategyNexthopState_GetWeight(elem);
double prob = w / strategy->weights_sum;
- if ((rnd >= start_range) && (rnd < (start_range + prob))) {
+ if ((rnd >= start_range) && (rnd <= (start_range + prob))) {
nexthop = parcUnsigned_GetUnsigned(cid);
break;
} else {