aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
authorYu Ping <ping.yu@intel.com>2019-05-07 02:24:30 +0800
committerPing Yu <ping.yu@intel.com>2019-05-07 02:09:58 +0000
commit0b81915af417ca568aa3c8d976e0ecfd3fdffe39 (patch)
tree424f10dbce9ab8b2ddfb17f595c2f970f965380c /src/vnet/session
parent3e9b7a219df7ba52db719af5216a44b31f21f770 (diff)
add TLS endpoint function
a bit like QUIC, and the added function can get the endpoint info in TLS, so that the VCL layer can get those info correctly Change-Id: Ied7aa3077087c1814499364dfa7654a088ad9910 Signed-off-by: Yu Ping <ping.yu@intel.com>
Diffstat (limited to 'src/vnet/session')
-rwxr-xr-xsrc/vnet/session/session_api.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index 83af125946e..85a4c6197ec 100755
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -387,7 +387,7 @@ mq_send_session_bound_cb (u32 app_wrk_index, u32 api_context,
{
svm_msg_q_msg_t _msg, *msg = &_msg;
svm_msg_q_t *app_mq, *vpp_evt_q;
- transport_connection_t *tc;
+ transport_endpoint_t tep;
session_bound_msg_t *mp;
app_worker_t *app_wrk;
session_event_t *evt;
@@ -420,10 +420,11 @@ mq_send_session_bound_cb (u32 app_wrk_index, u32 api_context,
ls = app_listener_get_session (al);
else
ls = app_listener_get_local_session (al);
- tc = listen_session_get_transport (ls);
- mp->lcl_port = tc->lcl_port;
- mp->lcl_is_ip4 = tc->is_ip4;
- clib_memcpy_fast (mp->lcl_ip, &tc->lcl_ip, sizeof (tc->lcl_ip));
+
+ session_get_endpoint (ls, &tep, 1 /* is_lcl */ );
+ mp->lcl_port = tep.port;
+ mp->lcl_is_ip4 = tep.is_ip4;
+ clib_memcpy_fast (mp->lcl_ip, &tep.ip, sizeof (tep.ip));
vpp_evt_q = session_main_get_vpp_event_queue (0);
mp->vpp_evt_q = pointer_to_uword (vpp_evt_q);