summaryrefslogtreecommitdiffstats
path: root/src/vcl/vppcom.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vcl/vppcom.c')
-rw-r--r--src/vcl/vppcom.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index 5e37dcfef39..96a207b741f 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -3697,7 +3697,8 @@ vppcom_session_attr (uint32_t session_handle, uint32_t op,
}
if (!session->ext_config)
{
- vcl_session_alloc_ext_cfg (session, TRANSPORT_ENDPT_EXT_CFG_CRYPTO);
+ vcl_session_alloc_ext_cfg (session, TRANSPORT_ENDPT_EXT_CFG_CRYPTO,
+ sizeof (transport_endpt_ext_cfg_t));
}
else if (session->ext_config->type != TRANSPORT_ENDPT_EXT_CFG_CRYPTO)
{
@@ -3744,6 +3745,23 @@ vppcom_session_attr (uint32_t session_handle, uint32_t op,
*buflen);
break;
+ case VPPCOM_ATTR_SET_ENDPT_EXT_CFG:
+ if (!(buffer && buflen && (*buflen > 0)))
+ {
+ rv = VPPCOM_EINVAL;
+ break;
+ }
+ if (session->ext_config)
+ {
+ rv = VPPCOM_EINVAL;
+ break;
+ }
+ vcl_session_alloc_ext_cfg (session, TRANSPORT_ENDPT_EXT_CFG_NONE,
+ *buflen + sizeof (u32));
+ clib_memcpy (session->ext_config->data, buffer, *buflen);
+ session->ext_config->len = *buflen;
+ break;
+
default:
rv = VPPCOM_EINVAL;
break;