diff options
author | Florin Coras <fcoras@cisco.com> | 2019-10-17 09:56:27 -0700 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2019-11-15 07:11:33 +0000 |
commit | 2c55610e206d7e99379a95c35b5bf588ca58739f (patch) | |
tree | aaabde7385c3cc2435ab2b0692ce220bffebdaa2 /src/vnet | |
parent | 1c2fd1609c321cc50b29573807c19e79621bcb5c (diff) |
vcl: add api to set lcl ip
Type: feature
Change-Id: I40169fbbe8a20670dd612c341b6c78b5c925bf74
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit ef7cbf6adf1882af4d4ae8657632d4a2a59efcb2)
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/session/application_interface.h | 1 | ||||
-rw-r--r-- | src/vnet/session/session_node.c | 1 | ||||
-rw-r--r-- | src/vnet/session/session_types.h | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/src/vnet/session/application_interface.h b/src/vnet/session/application_interface.h index 748b1b5b52a..33835dd5526 100644 --- a/src/vnet/session/application_interface.h +++ b/src/vnet/session/application_interface.h @@ -346,6 +346,7 @@ typedef struct session_connect_msg_ u8 proto; u8 is_ip4; ip46_address_t ip; + ip46_address_t lcl_ip; u8 hostname_len; u8 hostname[16]; u64 parent_handle; diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c index 268cd952c75..e8b68daae93 100644 --- a/src/vnet/session/session_node.c +++ b/src/vnet/session/session_node.c @@ -110,6 +110,7 @@ session_mq_connect_handler (void *data) a->sep.port = mp->port; a->sep.transport_proto = mp->proto; a->sep.peer.fib_index = mp->vrf; + clib_memcpy_fast (&a->sep.peer.ip, &mp->lcl_ip, sizeof (mp->lcl_ip)); a->sep.peer.sw_if_index = ENDPOINT_INVALID_INDEX; a->sep_ext.parent_handle = mp->parent_handle; if (mp->hostname_len) diff --git a/src/vnet/session/session_types.h b/src/vnet/session/session_types.h index 17a03403c97..f4bb24e85d0 100644 --- a/src/vnet/session/session_types.h +++ b/src/vnet/session/session_types.h @@ -21,7 +21,7 @@ #define SESSION_INVALID_INDEX ((u32)~0) #define SESSION_INVALID_HANDLE ((u64)~0) -#define SESSION_CTRL_MSG_MAX_SIZE 68 +#define SESSION_CTRL_MSG_MAX_SIZE 84 #define foreach_session_endpoint_fields \ foreach_transport_endpoint_cfg_fields \ |