aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application_interface.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-10-16 11:21:41 -0700
committerFlorin Coras <florin.coras@gmail.com>2019-10-16 22:42:54 +0000
commite24a4bc023b880cb01aeaf8ffea98f44dd66ef4a (patch)
treedef4dc147d4fcfc1801a18075176f98a82af7fa4 /src/vnet/session/application_interface.h
parent8a8b05c526883fe34b83239a3c4f56087d1df9e5 (diff)
session: increase max ctrl msg size
Type: fix Connect ctrl message recently outgrew the maximum ctrl msg size, so increase the limit. Also add static asserts for messages that could potentially exceed the limit. Change-Id: I0d3e32e0d4d67d7e222cff14ddba59a0c3fb8b00 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/application_interface.h')
-rw-r--r--src/vnet/session/application_interface.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/vnet/session/application_interface.h b/src/vnet/session/application_interface.h
index e5e36b841d1..d907287198a 100644
--- a/src/vnet/session/application_interface.h
+++ b/src/vnet/session/application_interface.h
@@ -298,6 +298,9 @@ typedef struct session_listen_msg_
u32 ckpair_index;
} __clib_packed session_listen_msg_t;
+STATIC_ASSERT (sizeof (session_listen_msg_t) <= SESSION_CTRL_MSG_MAX_SIZE,
+ "msg too large");
+
typedef struct session_listen_uri_msg_
{
u32 client_index;
@@ -305,6 +308,9 @@ typedef struct session_listen_uri_msg_
u8 uri[56];
} __clib_packed session_listen_uri_msg_t;
+STATIC_ASSERT (sizeof (session_listen_uri_msg_t) <= SESSION_CTRL_MSG_MAX_SIZE,
+ "msg too large");
+
typedef struct session_bound_msg_
{
u32 context;
@@ -371,6 +377,9 @@ typedef struct session_connect_msg_
u32 ckpair_index;
} __clib_packed session_connect_msg_t;
+STATIC_ASSERT (sizeof (session_connect_msg_t) <= SESSION_CTRL_MSG_MAX_SIZE,
+ "msg too large");
+
typedef struct session_connect_uri_msg_
{
u32 client_index;
@@ -378,6 +387,9 @@ typedef struct session_connect_uri_msg_
u8 uri[56];
} __clib_packed session_connect_uri_msg_t;
+STATIC_ASSERT (sizeof (session_connect_uri_msg_t) <=
+ SESSION_CTRL_MSG_MAX_SIZE, "msg too large");
+
typedef struct session_connected_msg_
{
u32 context;