aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl/vppcom.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vcl/vppcom.c')
-rw-r--r--src/vcl/vppcom.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index 1ece9db9940..a0f4338f902 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -193,7 +193,6 @@ vcl_send_session_listen (vcl_worker_t * wrk, vcl_session_t * s)
clib_memcpy_fast (&mp->ip, &s->transport.lcl_ip, sizeof (mp->ip));
mp->port = s->transport.lcl_port;
mp->proto = s->session_type;
- mp->ckpair_index = s->ckpair_index;
mp->vrf = s->vrf;
if (s->flags & VCL_SESSION_F_CONNECTED)
mp->flags = TRANSPORT_CFG_F_CONNECTED;
@@ -228,7 +227,6 @@ vcl_send_session_connect (vcl_worker_t * wrk, vcl_session_t * s)
mp->port = s->transport.rmt_port;
mp->lcl_port = s->transport.lcl_port;
mp->proto = s->session_type;
- mp->ckpair_index = s->ckpair_index;
mp->vrf = s->vrf;
if (s->flags & VCL_SESSION_F_CONNECTED)
mp->flags |= TRANSPORT_CFG_F_CONNECTED;
@@ -1374,7 +1372,6 @@ vppcom_session_create (u8 proto, u8 is_nonblocking)
session->session_type = proto;
session->session_state = VCL_STATE_CLOSED;
session->vpp_handle = ~0;
- session->ckpair_index = ~0;
session->is_dgram = vcl_proto_is_dgram (proto);
if (is_nonblocking)
@@ -3710,7 +3707,17 @@ vppcom_session_attr (uint32_t session_handle, uint32_t op,
rv = VPPCOM_EINVAL;
break;
}
- session->ckpair_index = *(uint32_t *) buffer;
+ if (!session->ext_config)
+ {
+ vcl_session_alloc_ext_cfg (session, TRANSPORT_ENDPT_EXT_CFG_CRYPTO);
+ }
+ else if (session->ext_config->type != TRANSPORT_ENDPT_EXT_CFG_CRYPTO)
+ {
+ rv = VPPCOM_EINVAL;
+ break;
+ }
+
+ session->ext_config->crypto.ckpair_index = *(uint32_t *) buffer;
break;
case VPPCOM_ATTR_SET_VRF: