summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-10-17 09:56:27 -0700
committerDamjan Marion <dmarion@me.com>2019-10-21 10:43:54 +0000
commitef7cbf6adf1882af4d4ae8657632d4a2a59efcb2 (patch)
tree318c4a8f265ccfce4294592339543d78f2f1f076 /src/vnet
parent12966a7a0acb41270c88903ee5360fef7ae09706 (diff)
vcl: add api to set lcl ip
Type: feature Change-Id: I40169fbbe8a20670dd612c341b6c78b5c925bf74 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/session/application_interface.h1
-rw-r--r--src/vnet/session/session_node.c1
-rw-r--r--src/vnet/session/session_types.h2
3 files changed, 3 insertions, 1 deletions
diff --git a/src/vnet/session/application_interface.h b/src/vnet/session/application_interface.h
index d907287198a..609a20a47f6 100644
--- a/src/vnet/session/application_interface.h
+++ b/src/vnet/session/application_interface.h
@@ -371,6 +371,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 c15d2be7a78..4f0251bc3f6 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -111,6 +111,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;
a->sep_ext.ckpair_index = mp->ckpair_index;
diff --git a/src/vnet/session/session_types.h b/src/vnet/session/session_types.h
index c2bb4dd56cb..2b5658490a2 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 \