summaryrefslogtreecommitdiffstats
path: root/src/plugins/cnat/cnat_node.h
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.h
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.h')
-rw-r--r--src/plugins/cnat/cnat_node.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/cnat/cnat_node.h b/src/plugins/cnat/cnat_node.h
index 157287b0cab..246fdb8ba57 100644
--- a/src/plugins/cnat/cnat_node.h
+++ b/src/plugins/cnat/cnat_node.h
@@ -922,7 +922,7 @@ cnat_session_create (cnat_session_t *session, cnat_node_ctx_t *ctx,
&session->key.cs_ip[VLIB_RX]);
rsession->value.cs_ts_index = session->value.cs_ts_index;
rsession->value.cs_lbi = INDEX_INVALID;
- rsession->value.flags = rsession_flags;
+ rsession->value.flags = rsession_flags | CNAT_SESSION_IS_RETURN;
rsession->value.cs_port[VLIB_TX] = session->key.cs_port[VLIB_RX];
rsession->value.cs_port[VLIB_RX] = session->key.cs_port[VLIB_TX];