Skip to content

Commit

Permalink
dispatcher: Don't take modulus of hash twice
Browse files Browse the repository at this point in the history
(cherry picked from commit 5b23ce2)
  • Loading branch information
gaaf authored and henningw committed Feb 5, 2019
1 parent 0a885da commit c931f28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/dispatcher/dispatch.c
Expand Up @@ -1878,7 +1878,7 @@ int ds_select_dst_limit(
}
break;
case DS_ALG_RANDOM: /* 6 - random selection */
hash = kam_rand() % idx->nr;
hash = kam_rand();
break;
case DS_ALG_HASHPV: /* 7 - hash on PV value */
if(ds_hash_pvar(msg, &hash) != 0) {
Expand Down

0 comments on commit c931f28

Please sign in to comment.