aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-light
diff options
context:
space:
mode:
authorAngelo Mantellini <manangel@cisco.com>2019-03-12 13:58:22 +0100
committerAngelo Mantellini <manangel@cisco.com>2019-03-12 14:14:40 +0100
commit982ef728639113069db6af0b7869afc457853a9b (patch)
tree22de4a9516c4df586cc8ccba1278f041687087ba /hicn-light
parente1dbbf7e8e0b2d5101aa4e06d90f82cfab5087d2 (diff)
[HICN-107] Error in the forwarder load balancer
Change-Id: I28aaa68b69d0399464ea14701a497192a6056e87 Signed-off-by: Angelo Mantellini <manangel@cisco.com>
Diffstat (limited to 'hicn-light')
-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 {