aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2024-10-28 11:49:34 -0700
committerDave Wallace <dwallacelf@gmail.com>2024-10-29 21:52:19 +0000
commit3b290df57ce9357abd0ecd8126ef8f4c1d725615 (patch)
treee76e16ff8ec64265d968340e89a1d73fba09a4f3
parent899baecb91a14229eb16a8fed0b695d49404c148 (diff)
udp: connected mode only for connects
Treat all connects as connected udp sessions. Connectionless udp is only possible with listeners. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I0a75b7c85b72274df909ed3b114eed4f6519477e
-rw-r--r--src/vnet/udp/udp.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/vnet/udp/udp.c b/src/vnet/udp/udp.c
index 8deeb9e41ee..1fc055f8d50 100644
--- a/src/vnet/udp/udp.c
+++ b/src/vnet/udp/udp.c
@@ -467,16 +467,7 @@ udp_open_connection (transport_endpoint_cfg_t * rmt)
uc->mss = rmt->mss ? rmt->mss : udp_default_mtu (um, uc->c_is_ip4);
if (rmt->peer.sw_if_index != ENDPOINT_INVALID_INDEX)
uc->sw_if_index = rmt->peer.sw_if_index;
- uc->flags |= UDP_CONN_F_OWNS_PORT;
- if (rmt->transport_flags & TRANSPORT_CFG_F_CONNECTED)
- {
- uc->flags |= UDP_CONN_F_CONNECTED;
- }
- else
- {
- clib_spinlock_init (&uc->rx_lock);
- uc->c_flags |= TRANSPORT_CONNECTION_F_CLESS;
- }
+ uc->flags |= UDP_CONN_F_OWNS_PORT | UDP_CONN_F_CONNECTED;
if (!um->csum_offload)
uc->cfg_flags |= UDP_CFG_F_NO_CSUM_OFFLOAD;
uc->next_node_index = rmt->next_node_index;