summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_api.c
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2017-06-14 12:38:28 -0400
committerDave Wallace <dwallacelf@gmail.com>2017-06-14 15:22:46 -0400
commitb2d5ff349d2c6cb2b733375dca4952cdeab2e7d3 (patch)
tree6b7e08d08d52a728c3ea720c2f4e8130740ca838 /src/vnet/session/session_api.c
parent8e60f32c576095fe44b904a9d0a99f5da2c081ab (diff)
Fix session api connect sock handler.
Change-Id: I034efb9fc3ebb846c0aef07b18c1f110b8cbf3e3 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'src/vnet/session/session_api.c')
-rwxr-xr-xsrc/vnet/session/session_api.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index 095cc118fc8..f772cb9fdb4 100755
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -658,11 +658,20 @@ vl_api_connect_sock_t_handler (vl_api_connect_sock_t * mp)
app = application_lookup (mp->client_index);
if (app)
{
- clib_memcpy (&a->tep.ip, mp->ip,
+ unix_shared_memory_queue_t *client_q;
+ u8 *ip = mp->is_ip4 ? (u8 *) & a->tep.ip.ip4 : (u8 *) & a->tep.ip;
+
+ client_q = vl_api_client_index_to_input_queue (mp->client_index);
+ mp->client_queue_address = pointer_to_uword (client_q);
+ a->tep.is_ip4 = mp->is_ip4;
+ a->tep.port = mp->port;
+
+ clib_memcpy (ip, mp->ip,
(mp->is_ip4 ? sizeof (ip4_address_t) :
sizeof (ip6_address_t)));
a->api_context = mp->context;
a->app_index = app->index;
+ a->proto = mp->proto;
a->mp = mp;
rv = vnet_connect (a);
}