diff --git a/src/vnet/session/application.c b/src/vnet/session/application.c
index 7bc2c11..1c46e78 100644
--- a/src/vnet/session/application.c
+++ b/src/vnet/session/application.c
@@ -442,7 +442,7 @@
   session_type_t sst;
 
   sst = session_type_from_proto_and_ip (sep->transport_proto, sep->is_ip4);
-  s = listen_session_new (sst);
+  s = listen_session_new (0, sst);
   s->app_index = srv->index;
 
   if (stream_session_listen (s, sep))
@@ -566,8 +566,7 @@
   stream_session_t *listener;
   if (application_local_session_listener_has_transport (ls))
     {
-      listener = listen_session_get (ls->listener_session_type,
-				     ls->listener_index);
+      listener = listen_session_get (ls->listener_index);
       return application_get_listen_segment_manager (app, listener);
     }
   return segment_manager_get (app->local_segment_manager);
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index d4220d4..d258b82 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -774,13 +774,10 @@
   application_t *server;
   stream_session_t *s, *listener;
   segment_manager_t *sm;
-  session_type_t sst;
   int rv;
 
-  sst = session_type_from_proto_and_ip (tc->proto, tc->is_ip4);
-
   /* Find the server */
-  listener = listen_session_get (sst, listener_index);
+  listener = listen_session_get (listener_index);
   server = application_get (listener->app_index);
 
   sm = application_get_listen_segment_manager (server, listener);
@@ -1150,7 +1147,6 @@
   session_type = session_type_from_proto_and_ip (transport_proto, is_ip4);
 
   vec_validate (smm->session_type_to_next, session_type);
-  vec_validate (smm->listen_sessions, session_type);
   vec_validate (smm->session_tx_fns, session_type);
 
   /* *INDENT-OFF* */
diff --git a/src/vnet/session/session.h b/src/vnet/session/session.h
index a6118d1..0b53f61 100644
--- a/src/vnet/session/session.h
+++ b/src/vnet/session/session.h
@@ -126,9 +126,6 @@
   /** Per worker-thread session pool peekers rw locks */
   clib_rwlock_t *peekers_rw_locks;
 
-  /** Pool of listen sessions. Same type as stream sessions to ease lookups */
-  stream_session_t **listen_sessions;
-
   /** Per-proto, per-worker enqueue epoch counters */
   u32 *current_enqueue_epoch[TRANSPORT_N_PROTO];
 
@@ -396,21 +393,6 @@
     }
 }
 
-always_inline stream_session_t *
-stream_session_listener_get (u8 sst, u64 si)
-{
-  return pool_elt_at_index (session_manager_main.listen_sessions[sst], si);
-}
-
-always_inline u32
-stream_session_get_index (stream_session_t * s)
-{
-  if (s->session_state == SESSION_STATE_LISTENING)
-    return s - session_manager_main.listen_sessions[s->session_type];
-
-  return s - session_manager_main.sessions[s->thread_index];
-}
-
 always_inline u32
 stream_session_max_rx_enqueue (transport_connection_t * tc)
 {
@@ -513,59 +495,42 @@
 listen_session_get_handle (stream_session_t * s)
 {
   ASSERT (s->session_state == SESSION_STATE_LISTENING);
-  return ((u64) s->session_type << 32) | s->session_index;
+  return session_handle (s);
 }
 
 always_inline stream_session_t *
 listen_session_get_from_handle (session_handle_t handle)
 {
-  session_manager_main_t *smm = &session_manager_main;
-  stream_session_t *s;
-  u32 type, index;
-  type = handle >> 32;
-  index = handle & 0xFFFFFFFF;
-
-  if (pool_is_free_index (smm->listen_sessions[type], index))
-    return 0;
-
-  s = pool_elt_at_index (smm->listen_sessions[type], index);
-  ASSERT (s->session_state == SESSION_STATE_LISTENING);
-  return s;
+  return session_get_from_handle (handle);
 }
 
 always_inline void
-listen_session_parse_handle (session_handle_t handle, u32 * type, u32 * index)
+listen_session_parse_handle (session_handle_t handle, u32 * index,
+			     u32 * thread_index)
 {
-  *type = handle >> 32;
-  *index = handle & 0xFFFFFFFF;
+  session_parse_handle (handle, index, thread_index);
 }
 
 always_inline stream_session_t *
-listen_session_new (session_type_t type)
+listen_session_new (u8 thread_index, session_type_t type)
 {
   stream_session_t *s;
-  pool_get_aligned (session_manager_main.listen_sessions[type], s,
-		    CLIB_CACHE_LINE_BYTES);
-  memset (s, 0, sizeof (*s));
-
+  s = session_alloc (thread_index);
   s->session_type = type;
   s->session_state = SESSION_STATE_LISTENING;
-  s->session_index = s - session_manager_main.listen_sessions[type];
-
   return s;
 }
 
 always_inline stream_session_t *
-listen_session_get (session_type_t type, u32 index)
+listen_session_get (u32 index)
 {
-  return pool_elt_at_index (session_manager_main.listen_sessions[type],
-			    index);
+  return session_get (index, 0);
 }
 
 always_inline void
 listen_session_del (stream_session_t * s)
 {
-  pool_put (session_manager_main.listen_sessions[s->session_type], s);
+  session_free (s);
 }
 
 transport_connection_t *listen_session_get_transport (stream_session_t * s);
@@ -574,14 +539,6 @@
 listen_session_get_local_session_endpoint (stream_session_t * listener,
 					   session_endpoint_t * sep);
 
-always_inline stream_session_t *
-session_manager_get_listener (u8 session_type, u32 index)
-{
-  return
-    pool_elt_at_index (session_manager_main.listen_sessions[session_type],
-		       index);
-}
-
 always_inline u8
 session_manager_is_enabled ()
 {
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index 9236b19..2a74a19 100755
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -174,7 +174,7 @@
 
   if (session_has_transport (s))
     {
-      listener = listen_session_get (s->session_type, s->listener_index);
+      listener = listen_session_get (s->listener_index);
       mp->listener_handle = listen_session_get_handle (listener);
       if (application_is_proxy (server))
 	{
@@ -199,8 +199,7 @@
       local_session_t *ll;
       if (application_local_session_listener_has_transport (ls))
 	{
-	  listener = listen_session_get (ls->listener_session_type,
-					 ls->listener_index);
+	  listener = listen_session_get (ls->listener_index);
 	  mp->listener_handle = listen_session_get_handle (listener);
 	  mp->is_ip4 = session_type_is_ip4 (listener->session_type);
 	}
@@ -210,8 +209,7 @@
 						     ls->listener_index);
 	  if (ll->transport_listener_index != ~0)
 	    {
-	      listener = listen_session_get (ll->listener_session_type,
-					     ll->transport_listener_index);
+	      listener = listen_session_get (ll->transport_listener_index);
 	      mp->listener_handle = listen_session_get_handle (listener);
 	    }
 	  else
diff --git a/src/vnet/session/session_cli.c b/src/vnet/session/session_cli.c
index 929e604..5283355 100755
--- a/src/vnet/session/session_cli.c
+++ b/src/vnet/session/session_cli.c
@@ -61,7 +61,7 @@
     str = format (0, "%-10u%-10u%-10lld",
 		  svm_fifo_max_dequeue (ss->server_rx_fifo),
 		  svm_fifo_max_enqueue (ss->server_tx_fifo),
-		  stream_session_get_index (ss));
+		  session_get_index (ss));
 
   if (ss->session_state >= SESSION_STATE_ACCEPTING)
     {
@@ -237,21 +237,18 @@
   if (do_listeners)
     {
       sst = session_type_from_proto_and_ip (transport_proto, 1);
-      vlib_cli_output (vm, "There are %d active %U listeners",
-		       pool_elts (smm->listen_sessions[sst]),
-		       format_transport_proto, transport_proto);
-      if (verbose)
-	{
-	  vlib_cli_output (vm, "%-40s%-24s%-10s", "Listener", "App", "S-idx");
-          /* *INDENT-OFF* */
-          pool_foreach (s, smm->listen_sessions[sst], ({
-            app_name = application_name_from_index (s->app_index);
-            vlib_cli_output (vm, "%U%-25v%-10u", format_stream_session, s, 1,
-                             app_name, s->session_index);
-            vec_free (app_name);
-          }));
-          /* *INDENT-ON* */
-	}
+      vlib_cli_output (vm, "%-40s%-24s%-10s", "Listener", "App", "S-idx");
+      /* *INDENT-OFF* */
+      pool_foreach (s, smm->sessions[0], ({
+	if (s->session_state != SESSION_STATE_LISTENING
+	    || s->session_type != sst)
+	  continue;
+	app_name = application_name_from_index (s->app_index);
+	vlib_cli_output (vm, "%U%-25v%-10u", format_stream_session, s, 1,
+			 app_name, s->session_index);
+	vec_free (app_name);
+      }));
+      /* *INDENT-ON* */
       return 0;
     }
 
diff --git a/src/vnet/session/session_lookup.c b/src/vnet/session/session_lookup.c
index 3a80286..83f95be 100644
--- a/src/vnet/session/session_lookup.c
+++ b/src/vnet/session/session_lookup.c
@@ -652,16 +652,14 @@
 {
   session_kv4_t kv4;
   int rv;
-  session_type_t session_type;
 
   /*
    * First, try a fully formed listener
    */
-  session_type = session_type_from_proto_and_ip (proto, 1);
   make_v4_listener_kv (&kv4, lcl, lcl_port, proto);
   rv = clib_bihash_search_inline_16_8 (&st->v4_session_hash, &kv4);
   if (rv == 0)
-    return session_manager_get_listener (session_type, (u32) kv4.value);
+    return listen_session_get ((u32) kv4.value);
 
   /*
    * Zero out the lcl ip and check if any 0/0 port binds have been done
@@ -671,7 +669,7 @@
       kv4.key[0] = 0;
       rv = clib_bihash_search_inline_16_8 (&st->v4_session_hash, &kv4);
       if (rv == 0)
-	return session_manager_get_listener (session_type, (u32) kv4.value);
+	return listen_session_get ((u32) kv4.value);
     }
   else
     {
@@ -684,7 +682,7 @@
   make_v4_proxy_kv (&kv4, lcl, proto);
   rv = clib_bihash_search_inline_16_8 (&st->v4_session_hash, &kv4);
   if (rv == 0)
-    return session_manager_get_listener (session_type, (u32) kv4.value);
+    return listen_session_get ((u32) kv4.value);
 
   return 0;
 }
@@ -706,13 +704,11 @@
 {
   session_kv6_t kv6;
   int rv;
-  session_type_t session_type;
 
-  session_type = session_type_from_proto_and_ip (proto, 0);
   make_v6_listener_kv (&kv6, lcl, lcl_port, proto);
   rv = clib_bihash_search_inline_48_8 (&st->v6_session_hash, &kv6);
   if (rv == 0)
-    return session_manager_get_listener (session_type, (u32) kv6.value);
+    return listen_session_get ((u32) kv6.value);
 
   /* Zero out the lcl ip */
   if (ip_wildcard)
@@ -720,7 +716,7 @@
       kv6.key[0] = kv6.key[1] = 0;
       rv = clib_bihash_search_inline_48_8 (&st->v6_session_hash, &kv6);
       if (rv == 0)
-	return session_manager_get_listener (session_type, (u32) kv6.value);
+	return listen_session_get ((u32) kv6.value);
     }
   else
     {
@@ -730,7 +726,7 @@
   make_v6_proxy_kv (&kv6, lcl, proto);
   rv = clib_bihash_search_inline_48_8 (&st->v6_session_hash, &kv6);
   if (rv == 0)
-    return session_manager_get_listener (session_type, (u32) kv6.value);
+    return listen_session_get ((u32) kv6.value);
   return 0;
 }
 
diff --git a/src/vnet/session/session_test.c b/src/vnet/session/session_test.c
index 248b4d7..c12041a 100644
--- a/src/vnet/session/session_test.c
+++ b/src/vnet/session/session_test.c
@@ -1375,7 +1375,7 @@
   u32 server_index, app_index;
   u32 dummy_server_api_index = ~0, sw_if_index = 0;
   clib_error_t *error = 0;
-  u8 sst, is_filtered = 0;
+  u8 is_filtered = 0;
   stream_session_t *s;
   transport_connection_t *tc;
   u16 lcl_port = 1234, rmt_port = 4321;
@@ -1454,8 +1454,7 @@
 				      TRANSPORT_PROTO_TCP, 0, &is_filtered);
   SESSION_TEST ((tc != 0), "lookup 1.2.3.4 1234 5.6.7.8 4321 should be "
 		"successful");
-  sst = session_type_from_proto_and_ip (TRANSPORT_PROTO_TCP, 1);
-  s = listen_session_get (sst, tc->s_index);
+  s = listen_session_get (tc->s_index);
   SESSION_TEST ((s->app_index == server_index), "lookup should return the"
 		" server");
 
diff --git a/src/vnet/tls/tls.c b/src/vnet/tls/tls.c
index d7dcb6d..492b3cc 100644
--- a/src/vnet/tls/tls.c
+++ b/src/vnet/tls/tls.c
@@ -384,8 +384,7 @@
   tls_ctx_t *lctx, *ctx;
   u32 ctx_handle;
 
-  tls_listener = listen_session_get (tls_session->session_type,
-				     tls_session->listener_index);
+  tls_listener = listen_session_get (tls_session->listener_index);
   lctx = tls_listener_ctx_get (tls_listener->opaque);
 
   ctx_handle = tls_ctx_alloc (lctx->tls_ctx_engine);
@@ -557,7 +556,6 @@
   stream_session_t *tls_listener;
   tls_ctx_t *lctx;
   u32 lctx_index;
-  session_type_t st;
   stream_session_t *app_listener;
   tls_engine_type_t engine_type;
 
@@ -581,8 +579,7 @@
   tls_listener = listen_session_get_from_handle (tls_handle);
   tls_listener->opaque = lctx_index;
 
-  st = session_type_from_proto_and_ip (TRANSPORT_PROTO_TLS, sep->is_ip4);
-  app_listener = listen_session_get (st, app_listener_index);
+  app_listener = listen_session_get (app_listener_index);
 
   lctx = tls_listener_ctx_get (lctx_index);
   lctx->parent_app_index = sep->app_index;
@@ -668,10 +665,10 @@
 {
   u32 tc_index = va_arg (*args, u32);
   tls_ctx_t *ctx = tls_listener_ctx_get (tc_index);
-  u32 listener_index, type;
+  u32 listener_index, thread_index;
 
-  listen_session_parse_handle (ctx->tls_session_handle, &type,
-			       &listener_index);
+  listen_session_parse_handle (ctx->tls_session_handle, &listener_index,
+			       &thread_index);
   return format (s, "[TLS] listener app %u child %u", ctx->parent_app_index,
 		 listener_index);
 }
