summaryrefslogtreecommitdiffstats
path: root/src/vnet/udp/udp_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/udp/udp_input.c')
-rw-r--r--src/vnet/udp/udp_input.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vnet/udp/udp_input.c b/src/vnet/udp/udp_input.c
index 523ab029bd4..c76c1b796bd 100644
--- a/src/vnet/udp/udp_input.c
+++ b/src/vnet/udp/udp_input.c
@@ -134,7 +134,8 @@ udp_connection_enqueue (udp_connection_t * uc0, session_t * s0,
{
int wrote0;
- clib_spinlock_lock (&uc0->rx_lock);
+ if (!(uc0->flags & UDP_CONN_F_CONNECTED))
+ clib_spinlock_lock (&uc0->rx_lock);
if (svm_fifo_max_enqueue_prod (s0->rx_fifo)
< hdr0->data_length + sizeof (session_dgram_hdr_t))
@@ -163,7 +164,8 @@ udp_connection_enqueue (udp_connection_t * uc0, session_t * s0,
unlock_rx_lock:
- clib_spinlock_unlock (&uc0->rx_lock);
+ if (!(uc0->flags & UDP_CONN_F_CONNECTED))
+ clib_spinlock_unlock (&uc0->rx_lock);
}
always_inline session_t *