summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vcl/vppcom.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index 9f8edce4965..207e208979c 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -508,10 +508,20 @@ vcl_session_connected_handler (vcl_worker_t * wrk,
session_index = mp->context;
session = vcl_session_get (wrk, session_index);
- if (!session)
+ if (PREDICT_FALSE (!session))
{
VDBG (0, "ERROR: vpp handle 0x%llx has no session index (%u)!",
mp->handle, session_index);
+ /* Should not happen but if it does, force vpp session cleanup */
+ vcl_session_t tmp_session = {
+ .vpp_handle = mp->handle,
+ .vpp_evt_q = 0,
+ };
+ vcl_segment_attach_session (
+ mp->segment_handle, mp->server_rx_fifo, mp->server_tx_fifo,
+ mp->vpp_event_queue_address, mp->mq_index, 0, session);
+ if (tmp_session.vpp_evt_q)
+ vcl_send_session_disconnect (wrk, &tmp_session);
return VCL_INVALID_SESSION_INDEX;
}
if (mp->retval)