aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/nat/nat.c')
-rw-r--r--src/plugins/nat/nat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/nat/nat.c b/src/plugins/nat/nat.c
index c2f9586c..9bdb0351 100644
--- a/src/plugins/nat/nat.c
+++ b/src/plugins/nat/nat.c
@@ -462,7 +462,7 @@ int snat_add_static_mapping(ip4_address_t l_addr, ip4_address_t e_addr,
u_key.addr = m->local_addr;
u_key.fib_index = m->fib_index;
kv.key = u_key.as_u64;
- if (sm->num_workers)
+ if (sm->num_workers > 1)
tsm = vec_elt_at_index (sm->per_thread_data, m->worker_index);
else
tsm = vec_elt_at_index (sm->per_thread_data, sm->num_workers);