session: fix crash during client detach
This fixes a crash caused by client closing socket before adding worker. During detach vpp tries to delete worker based on invalid worker index. Type: fix Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: I3242bcbb116ef5fd1d4c449f5bcf907e4e2f8f30
This commit is contained in:

committed by
Florin Coras

parent
9652177bc1
commit
9c32f05751
@ -1485,7 +1485,9 @@ sapi_socket_detach (app_namespace_t * app_ns, clib_socket_t * cs)
|
||||
|
||||
/* Cleanup everything because app worker closed socket or crashed */
|
||||
handle = (app_ns_api_handle_t *) & cs->private_data;
|
||||
app_wrk = app_worker_get (handle->aah_app_wrk_index);
|
||||
app_wrk = app_worker_get_if_valid (handle->aah_app_wrk_index);
|
||||
if (!app_wrk)
|
||||
return;
|
||||
|
||||
vnet_app_worker_add_del_args_t args = {
|
||||
.app_index = app_wrk->app_index,
|
||||
|
Reference in New Issue
Block a user