aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2023-06-24 14:43:42 -0700
committerFilip Tehlar <ftehlar@cisco.com>2023-06-26 10:33:49 +0200
commitd96859f09b8fa9bb458d62e43b962f240744b5c3 (patch)
tree820cf92b2579ee14bcb44a0aa8faa06e4fffeaff /src/vnet/session
parent503480d772158d404987aca60c94f96505991d4e (diff)
udp: pass cless hdr to transport through buffer
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I7177ada23e5a69ec8e362ec98b98010c3b44b3d7
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/session.c9
-rw-r--r--src/vnet/session/session_node.c6
2 files changed, 3 insertions, 12 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 9549cbaf577..5bb57761c90 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -1524,14 +1524,7 @@ session_stop_listen (session_t * s)
return SESSION_E_NONE;
if (!(tc->flags & TRANSPORT_CONNECTION_F_NO_LOOKUP))
- {
- if (transport_connection_is_cless (tc))
- {
- clib_memset (&tc->rmt_ip, 0, sizeof (tc->rmt_ip));
- tc->rmt_port = 0;
- }
- session_lookup_del_connection (tc);
- }
+ session_lookup_del_connection (tc);
transport_stop_listen (tp, s->connection_index);
return 0;
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index b0f4a93ee76..f652f2e9a1c 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -1105,10 +1105,8 @@ session_tx_fill_buffer (session_worker_t *wrk, session_tx_context_t *ctx,
if (transport_connection_is_cless (ctx->tc))
{
- ip_copy (&ctx->tc->rmt_ip, &hdr->rmt_ip, ctx->tc->is_ip4);
- ip_copy (&ctx->tc->lcl_ip, &hdr->lcl_ip, ctx->tc->is_ip4);
- /* Local port assumed to be bound, not overwriting it */
- ctx->tc->rmt_port = hdr->rmt_port;
+ clib_memcpy_fast (data0 - sizeof (session_dgram_hdr_t), hdr,
+ sizeof (*hdr));
}
hdr->data_offset += n_bytes_read;
if (hdr->data_offset == hdr->data_length)