session: avoid session handle conflict with vcl

Change-Id: I7f5a3b8d92ef07d60315bab6e560eba49ea07249
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index 11fa0fa..f21701c 100755
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -200,12 +200,23 @@
 	  listener = listen_session_get (ls->listener_session_type,
 					 ls->listener_index);
 	  mp->listener_handle = listen_session_get_handle (listener);
+	  mp->is_ip4 = session_type_is_ip4 (listener->session_type);
 	}
       else
 	{
 	  ll = application_get_local_listen_session (server,
 						     ls->listener_index);
-	  mp->listener_handle = application_local_session_handle (ll);
+	  if (ll->transport_listener_index != ~0)
+	    {
+	      listener = listen_session_get (ll->listener_session_type,
+					     ll->transport_listener_index);
+	      mp->listener_handle = listen_session_get_handle (listener);
+	    }
+	  else
+	    {
+	      mp->listener_handle = application_local_session_handle (ll);
+	    }
+	  mp->is_ip4 = session_type_is_ip4 (ll->listener_session_type);
 	}
       mp->handle = application_local_session_handle (ls);
       mp->port = ls->port;