summaryrefslogtreecommitdiffstats
path: root/src/vnet/udp/udp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-05-18 00:28:59 -0700
committerDave Barach <openvpp@barachs.net>2021-05-18 18:14:53 +0000
commitfb50bc31bfd54902231925749cacbbcd6dfccc96 (patch)
tree125bc081d141c3478ff8f3d6dad7a314726c1aeb /src/vnet/udp/udp.c
parenta48dffeed3d5182d1faa41f2ba64beb20bf10ea0 (diff)
tls: fix dtls with no workers
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iecc33fda7f28c037289775ffe0525a50f89a2b8c
Diffstat (limited to 'src/vnet/udp/udp.c')
-rw-r--r--src/vnet/udp/udp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/vnet/udp/udp.c b/src/vnet/udp/udp.c
index 1878d2ed083..40e0053bb96 100644
--- a/src/vnet/udp/udp.c
+++ b/src/vnet/udp/udp.c
@@ -375,8 +375,7 @@ conn_alloc:
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 @@ udp_session_get_half_open (u32 conn_index)
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;