summaryrefslogtreecommitdiffstats
path: root/plugins/snat-plugin/snat/out2in.c
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2016-11-28 05:36:24 -0800
committerMatus Fabian <matfabia@cisco.com>2016-11-28 05:36:24 -0800
commit38fb44f51d73f631df82830b4a09681fb2e41a3c (patch)
treece731a25d7bd9977bb6aae5a342cc835cfc1d196 /plugins/snat-plugin/snat/out2in.c
parent985f3d11fae7f93eb9a9e96d59b8e7a066819672 (diff)
snat: fix coverity issues
Change-Id: Icb8239c02af8758a9e4bf299726a89677f53451d Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'plugins/snat-plugin/snat/out2in.c')
-rw-r--r--plugins/snat-plugin/snat/out2in.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/snat-plugin/snat/out2in.c b/plugins/snat-plugin/snat/out2in.c
index a4641d3a71e..13e596b9a0d 100644
--- a/plugins/snat-plugin/snat/out2in.c
+++ b/plugins/snat-plugin/snat/out2in.c
@@ -830,6 +830,8 @@ snat_out2in_worker_handoff_fn (vlib_main_t * vm,
u32 current_worker_index = ~0;
u32 cpu_index = os_get_cpu_number ();
+ ASSERT (vec_len (sm->workers));
+
if (PREDICT_FALSE (handoff_queue_elt_by_worker_index == 0))
{
vec_validate (handoff_queue_elt_by_worker_index, tm->n_vlib_mains - 1);
@@ -888,6 +890,8 @@ snat_out2in_worker_handoff_fn (vlib_main_t * vm,
if (PREDICT_FALSE (next_worker_index != cpu_index))
{
+ do_handoff = 1;
+
if (next_worker_index != current_worker_index)
{
if (hf)