aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2023-06-20 16:50:51 -0700
committerDave Barach <vpp@barachs.net>2023-06-21 16:52:22 +0000
commit4aeba3776244efe5fbf8de894b6af13a9220762c (patch)
treea8c208c6e1bc80f4baf85097a3609d48c520b58d
parenta9edb9a16895219ec47f2af1acc4289e587ab76f (diff)
session: mark half-open transport closed on ntf
Make sure half-open sessions are marked as transport closed once connected notification is provided. This ensures that if they've been scheduled for tx, the event is ignored. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I8c44584e843d93365ec737ae4e1bcb74eba35506
-rw-r--r--src/vnet/session/session.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index a07082b766c..9549cbaf577 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -309,7 +309,7 @@ session_cleanup_half_open (session_handle_t ho_handle)
else
{
/* Cleanup half-open session lookup table if need be */
- if (ho->session_state != SESSION_STATE_TRANSPORT_CLOSING)
+ if (ho->session_state != SESSION_STATE_TRANSPORT_CLOSED)
{
transport_connection_t *tc;
tc = transport_get_half_open (session_get_transport_proto (ho),
@@ -348,7 +348,7 @@ session_half_open_delete_notify (transport_connection_t *tc)
session_t *ho = ho_session_get (tc->s_index);
/* Cleanup half-open lookup table if need be */
- if (ho->session_state != SESSION_STATE_TRANSPORT_CLOSING)
+ if (ho->session_state != SESSION_STATE_TRANSPORT_CLOSED)
{
if (!(tc->flags & TRANSPORT_CONNECTION_F_NO_LOOKUP))
session_lookup_del_half_open (tc);
@@ -911,7 +911,7 @@ session_stream_connect_notify (transport_connection_t * tc,
session_lookup_del_half_open (tc);
ho = ho_session_get (tc->s_index);
- session_set_state (ho, SESSION_STATE_TRANSPORT_CLOSING);
+ session_set_state (ho, SESSION_STATE_TRANSPORT_CLOSED);
opaque = ho->opaque;
app_wrk = app_worker_get_if_valid (ho->app_wrk_index);
if (!app_wrk)