diff options
Diffstat (limited to 'src/vcl/vppcom.c')
-rw-r--r-- | src/vcl/vppcom.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c index 184cb821e1d..cf8bb72d451 100644 --- a/src/vcl/vppcom.c +++ b/src/vcl/vppcom.c @@ -183,6 +183,7 @@ vcl_send_session_listen (vcl_worker_t * wrk, vcl_session_t * s) 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; app_send_ctrl_evt_to_vpp (mq, app_evt); @@ -210,6 +211,7 @@ vcl_send_session_connect (vcl_worker_t * wrk, vcl_session_t * s) 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; app_send_ctrl_evt_to_vpp (mq, app_evt); @@ -3673,6 +3675,25 @@ vppcom_session_attr (uint32_t session_handle, uint32_t op, session->ckpair_index = *(uint32_t *) buffer; break; + case VPPCOM_ATTR_SET_VRF: + if (!(buffer && buflen && (*buflen == sizeof (u32)))) + { + rv = VPPCOM_EINVAL; + break; + } + session->vrf = *(u32 *) buffer; + break; + + case VPPCOM_ATTR_GET_VRF: + if (!(buffer && buflen && (*buflen >= sizeof (u32)))) + { + rv = VPPCOM_EINVAL; + break; + } + *(u32 *) buffer = session->vrf; + *buflen = sizeof (u32); + break; + default: rv = VPPCOM_EINVAL; break; |