session: fix listener global endpoint lookup

Type: fix

Ensure listeners for app transport protocols are added to lookup tables
using their session endpoints instead of their transport connections,
which can override the network connection id in the transport connection.

Change-Id: I56fa3666bb1422c0799fc7143cd099751ff6e2e6
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/vnet/tls/tls.c b/src/vnet/tls/tls.c
index cfe2c3a..6a4f99e 100644
--- a/src/vnet/tls/tls.c
+++ b/src/vnet/tls/tls.c
@@ -615,11 +615,11 @@
       return -1;
     }
 
-  sep->transport_proto = TRANSPORT_PROTO_TCP;
   clib_memset (args, 0, sizeof (*args));
   args->app_index = tm->app_index;
   args->sep_ext = *sep;
   args->sep_ext.ns_index = app->ns_index;
+  args->sep_ext.transport_proto = TRANSPORT_PROTO_TCP;
   if (vnet_listen (args))
     return -1;