summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2024-04-01 19:51:22 -0700
committerDave Barach <vpp@barachs.net>2024-04-02 16:44:25 +0000
commit461aaa8d7a3bde05de675133b196f206287e2d60 (patch)
treef4290086a4f982ec80c3b40c49063be2a633a331
parent9dec76be0f7a255f60ed64ed3f8dad7edc4fb83e (diff)
session: fix closing ntfs handling for refused sessions
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I1464e93cd3020eaa26068df558924e39dd255ccb
-rw-r--r--src/vnet/session/session_input.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/session/session_input.c b/src/vnet/session/session_input.c
index 41e8beb8abc..5899242f975 100644
--- a/src/vnet/session/session_input.c
+++ b/src/vnet/session/session_input.c
@@ -225,11 +225,17 @@ app_worker_flush_events_inline (app_worker_t *app_wrk, u32 thread_index,
break;
case SESSION_CTRL_EVT_TRANSPORT_CLOSED:
s = session_get (evt->session_index, thread_index);
+ /* Notification enqueued before session was refused by app */
+ if (PREDICT_FALSE (s->app_wrk_index == APP_INVALID_INDEX))
+ break;
if (app->cb_fns.session_transport_closed_callback)
app->cb_fns.session_transport_closed_callback (s);
break;
case SESSION_CTRL_EVT_CLEANUP:
s = session_get (evt->as_u64[0] & 0xffffffff, thread_index);
+ /* Notification enqueued before session was refused by app */
+ if (PREDICT_FALSE (s->app_wrk_index == APP_INVALID_INDEX))
+ break;
if (app->cb_fns.session_cleanup_callback)
app->cb_fns.session_cleanup_callback (s, evt->as_u64[0] >> 32);
if (evt->as_u64[0] >> 32 != SESSION_CLEANUP_SESSION)