session: avoid rx notifications on accepting sessions 97/28397/1
authorFlorin Coras <fcoras@cisco.com>
Sun, 19 Apr 2020 22:41:55 +0000 (22:41 +0000)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Thu, 13 Aug 2020 17:20:47 +0000 (17:20 +0000)
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iba37e528e968104c3ba9c8324438ba695ddddfd1
(cherry picked from commit da302e4fce1003a2fdd2ace7e1ae09987399092c)

src/vnet/session/session.c

index 258a158..0e4651a 100644 (file)
@@ -573,6 +573,11 @@ session_enqueue_notify_inline (session_t * s)
   SESSION_EVT (SESSION_EVT_ENQ, s, svm_fifo_max_dequeue_prod (s->rx_fifo));
 
   s->flags &= ~SESSION_F_RX_EVT;
+
+  /* Application didn't confirm accept yet */
+  if (PREDICT_FALSE (s->session_state == SESSION_STATE_ACCEPTING))
+    return 0;
+
   if (PREDICT_FALSE (app_worker_lock_and_send_event (app_wrk, s,
                                                     SESSION_IO_EVT_RX)))
     return -1;