summaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2023-02-08 09:47:54 -0800
committerFlorin Coras <fcoras@cisco.com>2023-02-08 21:32:34 -0800
commit7a6532bb9f3b9c429f92d11a6ccbf55638906d0a (patch)
treeec3b2fa46de87953a6c5398a358a1424437423d0 /src/vnet/session
parent9db6db065a78003d5105a660d3e8ddf0cf889d16 (diff)
session: accept lcl ip updates on cl sessions
Allow apps/vcl to provide updated local ips for dgrams. In particular, allow sessions bound to 0/0 to send data with valid local ips. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I50a086b1c252731a32a15b6a181ad3dba0c687e0
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/session_node.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index fd57f08aed7..7a630715591 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -1101,6 +1101,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;
}
hdr->data_offset += n_bytes_read;