tls: fix dtls with no workers

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iecc33fda7f28c037289775ffe0525a50f89a2b8c
diff --git a/src/vnet/udp/udp.c b/src/vnet/udp/udp.c
index 1878d2e..40e0053 100644
--- a/src/vnet/udp/udp.c
+++ b/src/vnet/udp/udp.c
@@ -375,8 +375,7 @@
   udp_connection_register_port (vm, lcl_port, rmt->is_ip4);
 
   /* We don't poll main thread if we have workers */
-  if (vlib_num_workers ())
-    thread_index = 1;
+  thread_index = transport_cl_thread ();
 
   uc = udp_connection_alloc (thread_index);
   ip_copy (&uc->c_rmt_ip, &rmt->ip, rmt->is_ip4);
@@ -408,7 +407,7 @@
   u32 thread_index;
 
   /* We don't poll main thread if we have workers */
-  thread_index = vlib_num_workers ()? 1 : 0;
+  thread_index = transport_cl_thread ();
   uc = udp_connection_get (conn_index, thread_index);
   if (!uc)
     return 0;