aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-03-09 18:36:06 -0800
committerDave Wallace <dwallacelf@gmail.com>2021-06-03 19:10:35 +0000
commitd5f89e04ae1154a6945923c06b328bca57e44865 (patch)
tree9d898bc925cd19c4196608a783f3235287861d4c /src/vnet/session
parentafb0194b5aba63184edb3ddc34288b5aad4560e2 (diff)
session: lcl transport info on accept
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ia46b0b8afed30f84b244c06f0457303f9e8832cd (cherry picked from commit 67c90a32b7ad0c5a38c483ce849cc7a231e7ba54)
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/application_interface.h1
-rw-r--r--src/vnet/session/session_api.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/vnet/session/application_interface.h b/src/vnet/session/application_interface.h
index 733f5dc0ef6..46029f0307a 100644
--- a/src/vnet/session/application_interface.h
+++ b/src/vnet/session/application_interface.h
@@ -378,6 +378,7 @@ typedef struct session_accepted_msg_
u64 segment_handle;
uword vpp_event_queue_address;
u32 mq_index;
+ transport_endpoint_t lcl;
transport_endpoint_t rmt;
u8 flags;
} __clib_packed session_accepted_msg_t;
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index cf5a66d9e7a..fe9ebc15db3 100644
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -163,6 +163,7 @@ mq_send_session_accepted_cb (session_t * s)
m.handle = session_handle (s);
session_get_endpoint (s, &m.rmt, 0 /* is_lcl */);
+ session_get_endpoint (s, &m.lcl, 1 /* is_lcl */);
}
else
{
@@ -173,6 +174,7 @@ mq_send_session_accepted_cb (session_t * s)
m.listener_handle = app_listen_session_handle (listener);
m.rmt.is_ip4 = session_type_is_ip4 (listener->session_type);
m.rmt.port = ct->c_rmt_port;
+ m.lcl.port = ct->c_lcl_port;
m.handle = session_handle (s);
m.vpp_event_queue_address =
fifo_segment_msg_q_offset (eq_seg, s->thread_index);