diff options
author | 2019-10-16 11:21:41 -0700 | |
---|---|---|
committer | 2019-10-31 12:13:57 +0000 | |
commit | b345e41ed02364a5957ce487ecad32c0b98d02f9 (patch) | |
tree | e6bf75dd7f02a712836e3910f38717f35f6d6933 /src/vnet/session/application_interface.h | |
parent | 7364ac14b64f86314b386c1428972c96ced67695 (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>
(cherry picked from commit e24a4bc023b880cb01aeaf8ffea98f44dd66ef4a)
Diffstat (limited to 'src/vnet/session/application_interface.h')
-rw-r--r-- | src/vnet/session/application_interface.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/vnet/session/application_interface.h b/src/vnet/session/application_interface.h index 015a297f852..748b1b5b52a 100644 --- a/src/vnet/session/application_interface.h +++ b/src/vnet/session/application_interface.h @@ -273,6 +273,9 @@ typedef struct session_listen_msg_ ip46_address_t ip; } __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; @@ -280,6 +283,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; @@ -345,6 +351,9 @@ typedef struct session_connect_msg_ u64 parent_handle; } __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; @@ -352,6 +361,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; |