aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-05-10 21:12:27 -0700
committerDamjan Marion <dmarion@me.com>2021-05-12 08:44:38 +0000
commit2c876f9c587a359ffd7191723cf616b14dcb9cf1 (patch)
tree17f941b0fe361b8c918b4bcfe63f3f5d3d469693 /src/vnet/session/session.c
parent89a9f61dfcd76cdbfd7c731b823cb4a3a7e8d1cf (diff)
tls: switch to vc service and track half-open sessions
Half-open tls sessions are now tracked by the app worker and are cleaned up only when tcp cleans up its half-open session, i.e., independent of when the established tls context is allocated. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: If5d594d7095192dd527daf4ea1358ffeccdfcc7a
Diffstat (limited to 'src/vnet/session/session.c')
-rw-r--r--src/vnet/session/session.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 16b6ce412ac..0d2301c5f83 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -316,7 +316,7 @@ session_half_open_delete_notify (transport_connection_t *tc)
s = ho_session_get (tc->s_index);
app_wrk = app_worker_get (s->app_wrk_index);
- app_worker_del_half_open (app_wrk, s->ho_index);
+ app_worker_del_half_open (app_wrk, s);
session_free (s);
}
@@ -339,7 +339,7 @@ session_alloc_for_connection (transport_connection_t * tc)
return s;
}
-static session_t *
+session_t *
session_alloc_for_half_open (transport_connection_t *tc)
{
session_t *s;
@@ -1297,7 +1297,8 @@ session_open_vc (session_endpoint_cfg_t *rmt, session_handle_t *rsh)
ho->opaque = rmt->opaque;
*rsh = session_handle (ho);
- session_lookup_add_half_open (tc, tc->c_index);
+ if (!(tc->flags & TRANSPORT_CONNECTION_F_NO_LOOKUP))
+ session_lookup_add_half_open (tc, tc->c_index);
return 0;
}