session: fix local binds 31/17831/2
authorFlorin Coras <fcoras@cisco.com>
Mon, 25 Feb 2019 23:17:28 +0000 (15:17 -0800)
committerFlorin Coras <florin.coras@gmail.com>
Tue, 26 Feb 2019 15:28:26 +0000 (15:28 +0000)
Change-Id: I1d92bec29c718de7a517bbbb335d09c68c221c71
Signed-off-by: Florin Coras <fcoras@cisco.com>
src/vnet/session/session_api.c
src/vnet/session/session_types.h

index 5780787..f96274a 100755 (executable)
@@ -710,7 +710,9 @@ mq_send_session_bound_cb (u32 app_wrk_index, u32 api_context,
   else
     {
       local_session_t *local;
-      local = application_get_local_listener_w_handle (handle);
+      app_listener_t *al;
+      al = app_listener_get_w_handle (handle);
+      local = application_get_local_listen_session (app, al->local_index);
       mp->lcl_port = local->port;
       mp->lcl_is_ip4 = session_type_is_ip4 (local->session_type);
     }
index a7e33a6..3709445 100644 (file)
@@ -368,8 +368,7 @@ local_session_parse_handle (session_handle_t handle, u32 * app_or_wrk_index,
                            u32 * session_index)
 {
   u32 bottom;
-  ASSERT (((handle >> 32) == SESSION_LOCAL_HANDLE_PREFIX)
-         || ((handle >> 32) == SESSION_LISTENER_PREFIX));
+  ASSERT (((handle >> 32) == SESSION_LOCAL_HANDLE_PREFIX));
   bottom = (handle & 0xFFFFFFFF);
   local_session_parse_id (bottom, app_or_wrk_index, session_index);
 }