aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cnat
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cnat')
-rw-r--r--src/plugins/cnat/cnat_node_vip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/cnat/cnat_node_vip.c b/src/plugins/cnat/cnat_node_vip.c
index 224dd1cf06b..5c1e0e44abe 100644
--- a/src/plugins/cnat/cnat_node_vip.c
+++ b/src/plugins/cnat/cnat_node_vip.c
@@ -160,7 +160,7 @@ cnat_vip_inline (vlib_main_t * vm,
hash_c0 = (AF_IP4 == ctx->af ?
ip4_compute_flow_hash (ip4, lb0->lb_hash_config) :
ip6_compute_flow_hash (ip6, lb0->lb_hash_config));
- bucket0 = hash_c0 & lb0->lb_n_buckets_minus_1;
+ bucket0 = hash_c0 % lb0->lb_n_buckets;
dpo0 = load_balance_get_fwd_bucket (lb0, bucket0);
/* add the session */