aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2023-08-31 17:33:47 -0700
committerDave Barach <vpp@barachs.net>2023-09-04 00:08:40 +0000
commit2ceb818f8eca4b8aebd0a4f2b36a641c832d8819 (patch)
treea76fd431321eb044c7ba883e6ca51dfbd918ff25 /src/vnet/session/session.c
parent23d13c071e80ab6bbed4f5d6cf14ef9ccf05384a (diff)
session: fix allocation of proxy fifos
Fifos need to be synchronously allocated once a transport like tcp accepts a session. Since events are now delivered asynchronously, proxy apps must explicitly register a cb function that manages fifo allocation prior to being notified of connect event. Type: fix Fixes: 0242d30 Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I7df973b7014e53e0766ea2bdc61e9871160bc18b
Diffstat (limited to 'src/vnet/session/session.c')
-rw-r--r--src/vnet/session/session.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index b494041f9eb..1f73eefd773 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -920,6 +920,7 @@ session_stream_connect_notify (transport_connection_t * tc,
s = session_alloc_for_connection (tc);
session_set_state (s, SESSION_STATE_CONNECTING);
s->app_wrk_index = app_wrk->wrk_index;
+ s->opaque = opaque;
new_si = s->session_index;
new_ti = s->thread_index;
@@ -1342,6 +1343,7 @@ session_open_cl (session_endpoint_cfg_t *rmt, session_handle_t *rsh)
app_wrk = app_worker_get (rmt->app_wrk_index);
s = session_alloc_for_connection (tc);
s->app_wrk_index = app_wrk->wrk_index;
+ s->opaque = rmt->opaque;
session_set_state (s, SESSION_STATE_OPENED);
if (app_worker_init_connected (app_wrk, s))
{