summaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
authorliuyacan <liuyacan@corp.netease.com>2021-08-20 10:25:43 +0800
committerFlorin Coras <florin.coras@gmail.com>2021-09-01 14:08:00 +0000
commit0242fd81ca6d13cad960870df09bf5732b892991 (patch)
tree269968477c7607ada88c12f23161800ca6bdce18 /src/vnet/session
parent99e4145fa5ebdc15d54128223b44b89e4f5c8c19 (diff)
udp: fill rmt info if session is connection less
The app may send packet to different remote via sendto() with same socket (without calling connect()). In such scenario, remote address need to be filled in. Type: fix Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: I49deb308668c05442f237e97acc9bfa239782482
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/session_node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index 18fb61d25e9..72df07b1d6d 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -973,7 +973,7 @@ session_tx_fill_buffer (vlib_main_t * vm, session_tx_context_t * ctx,
n_bytes_read = svm_fifo_peek (f, offset, deq_now, data0);
ASSERT (n_bytes_read > 0);
- if (ctx->s->session_state == SESSION_STATE_LISTENING)
+ if (transport_connection_is_cless (ctx->tc))
{
ip_copy (&ctx->tc->rmt_ip, &hdr->rmt_ip, ctx->tc->is_ip4);
ctx->tc->rmt_port = hdr->rmt_port;