summaryrefslogtreecommitdiffstats
path: root/src/plugins/cnat/cnat_node_vip.c
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2021-04-06 17:58:18 +0200
committerBeno�t Ganne <bganne@cisco.com>2021-04-21 14:50:24 +0000
commit832926bd9666717ff2310f93981f3383e1de5ab6 (patch)
tree2511115e328a080384473515ee1ec84992eae320 /src/plugins/cnat/cnat_node_vip.c
parent1fbf034e3ea97d507e41420248c99da7bdc916bf (diff)
cnat: Fix session flag initialization
Type: fix Sometimes session->value.flags wasn't initialized leading to next_node index corruption. Also added a debug flag to tell session/rsessions appart Change-Id: I80da50f2267e03a4552e8c9efc8e3aa08bc5569d Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/plugins/cnat/cnat_node_vip.c')
-rw-r--r--src/plugins/cnat/cnat_node_vip.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/cnat/cnat_node_vip.c b/src/plugins/cnat/cnat_node_vip.c
index f0a4ad7d84e..f166bd4f194 100644
--- a/src/plugins/cnat/cnat_node_vip.c
+++ b/src/plugins/cnat/cnat_node_vip.c
@@ -148,6 +148,7 @@ cnat_vip_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *b,
session->value.dpoi_next_node = ct->ct_lb.dpoi_next_node;
session->value.cs_lbi = dpoi_index;
+ session->value.flags = 0;
rv = cspm->vip_policy (vm, b, session, &rsession_flags, ct, ctx);
if (CNAT_SOURCE_ERROR_USE_DEFAULT == rv)