summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat.c
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2018-03-27 01:07:25 -0700
committerOle Trøan <otroan@employees.org>2018-03-28 07:05:24 +0000
commit4888b50bb4625c4de029958b9d1f41a626ede33c (patch)
treed136290395930c679b95d1d0388f28e01fb2e9fa /src/plugins/nat/nat.c
parentaa0180b9e02270012e7c4c451b70e33df986c4cc (diff)
NAT44: fix nat44_user_session_dump and nat44_del_session crash with one worker (VPP-1213)
Change-Id: I8e0c7ed2ff462b9ab59c233f56be262ec03c29ff Signed-off-by: Matus Fabian <matfabia@cisco.com>
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 feeee759e1b..8f4050ee2e7 100644
--- a/src/plugins/nat/nat.c
+++ b/src/plugins/nat/nat.c
@@ -2862,7 +2862,7 @@ nat44_del_session (snat_main_t *sm, ip4_address_t *addr, u16 port,
snat_user_t *u;
ip.dst_address.as_u32 = ip.src_address.as_u32 = addr->as_u32;
- if (sm->num_workers)
+ if (sm->num_workers > 1)
tsm =
vec_elt_at_index (sm->per_thread_data,
sm->worker_in2out_cb (&ip, fib_index));