summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application_local.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-06-12 11:56:19 -0700
committerDave Wallace <dwallacelf@gmail.com>2021-06-14 19:46:02 +0000
commit8b297dbcebd6b437b16dc6923f8144ea457c944a (patch)
tree5c8c18157d8108c1f0930bedb12aef8fb07b0b35 /src/vnet/session/application_local.c
parenta34aad732b7c2bedd8e336336d0c42add2c5a951 (diff)
session: fix listener ct transport retrieval on acceptv21.06-rc2
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ied2608e7a28c59c908803ca676abbe93072fadb8 (cherry picked from commit ba02641cc7a27ff02aca65036ffc4bd003497f0b)
Diffstat (limited to 'src/vnet/session/application_local.c')
-rw-r--r--src/vnet/session/application_local.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/vnet/session/application_local.c b/src/vnet/session/application_local.c
index 2152738cff0..b5c062f543c 100644
--- a/src/vnet/session/application_local.c
+++ b/src/vnet/session/application_local.c
@@ -279,7 +279,8 @@ static void
ct_accept_rpc_wrk_handler (void *accept_args)
{
u32 cct_index, ho_index, thread_index, ll_index;
- ct_connection_t *sct, *cct, *ll_ct, *ho;
+ ct_connection_t *sct, *cct, *ho;
+ transport_connection_t *ll_ct;
app_worker_t *server_wrk;
session_t *ss, *ll;
@@ -319,20 +320,20 @@ ct_accept_rpc_wrk_handler (void *accept_args)
ll_index = cct->peer_index;
ll = listen_session_get (ll_index);
sct = ct_connection_alloc (thread_index);
- ll_ct = ct_connection_get (ll->connection_index, 0 /* listener thread */);
+ /* Transport not necessarily ct but it might, so grab after sct alloc */
+ ll_ct = listen_session_get_transport (ll);
/* Make sure cct is valid after sct alloc */
cct = ct_connection_get (cct_index, thread_index);
- cct->actual_tp = ll_ct->actual_tp;
sct->c_rmt_port = 0;
- sct->c_lcl_port = ll_ct->c_lcl_port;
+ sct->c_lcl_port = ll_ct->lcl_port;
sct->c_is_ip4 = cct->c_is_ip4;
- clib_memcpy (&sct->c_lcl_ip, &ll_ct->c_lcl_ip, sizeof (ll_ct->c_lcl_ip));
+ clib_memcpy (&sct->c_lcl_ip, &ll_ct->lcl_ip, sizeof (ll_ct->lcl_ip));
sct->client_wrk = cct->client_wrk;
sct->c_proto = TRANSPORT_PROTO_NONE;
sct->client_opaque = cct->client_opaque;
- sct->actual_tp = ll_ct->actual_tp;
+ sct->actual_tp = cct->actual_tp;
sct->peer_index = cct->c_c_index;
cct->peer_index = sct->c_c_index;
@@ -406,6 +407,7 @@ ct_connect (app_worker_t * client_wrk, session_t * ll,
clib_memcpy (&ho->c_rmt_ip, &sep->ip, sizeof (sep->ip));
ho->flags |= CT_CONN_F_CLIENT;
ho->c_s_index = ~0;
+ ho->actual_tp = sep->transport_proto;
/*
* Accept connection on thread selected above. Connected reply comes