aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_api.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2023-11-28 15:28:16 -0800
committerDave Wallace <dwallacelf@gmail.com>2023-11-29 17:01:08 +0000
commit18710d58f0dfae6c8455eedfe46545566e7ed4a8 (patch)
tree78dee88a9ed92cf4c7f7c8ff9dd2a9dbe25fd4de /src/vnet/session/session_api.c
parent1b75fdbda01ceac2051e3d443c1db0d884d11bd5 (diff)
session: no reply on app del worker with sapi
With socket api, applications should not expect reply after worker del msg. VCL in particular closes the socket after it enqueues the message. Found by ASAN. Type: fix Signed-off-by: Dmitry Valter <d-valter@yandex-team.com> Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I1be02a0cde6b96a96edb709f3fe30bbc01ff2d24
Diffstat (limited to 'src/vnet/session/session_api.c')
-rw-r--r--src/vnet/session/session_api.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index ff49d2ac032..06edb82bdb3 100644
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -1463,6 +1463,10 @@ sapi_add_del_worker_handler (app_namespace_t * app_ns,
done:
+ /* With app sock api socket expected to be closed, no reply */
+ if (!mp->is_add && appns_sapi_enabled ())
+ return;
+
msg.type = APP_SAPI_MSG_TYPE_ADD_DEL_WORKER_REPLY;
rmp = &msg.worker_add_del_reply;
rmp->retval = rv;