session: unset fifo evt to enqueue ack evt on tcp timewait 28/40128/7
authoremmanuel <emmanuelscaria11@gmail.com>
Thu, 21 Dec 2023 09:55:41 +0000 (01:55 -0800)
committerFlorin Coras <florin.coras@gmail.com>
Fri, 22 Dec 2023 16:27:48 +0000 (16:27 +0000)
Incase the ack for the fin is lost twice or want to dup ack
packets with incorrect ack/seq # at different times and
session state is already closed, this fifo event is set for
the first ack that went out and prevents queuing of further events.

Type: fix
Change-Id: I102019fca26918a51e055a751db7209011bd43ad
Signed-off-by: emmanuel <emmanuelscaria11@gmail.com>
src/vnet/session/session_node.c

index 4e190df..01dd669 100644 (file)
@@ -1420,9 +1420,12 @@ session_tx_fifo_read_and_snd_i (session_worker_t * wrk,
       ctx->sp.max_burst_size = max_burst;
       n_custom_tx = ctx->transport_vft->custom_tx (ctx->tc, &ctx->sp);
       *n_tx_packets += n_custom_tx;
-      if (PREDICT_FALSE
-         (ctx->s->session_state >= SESSION_STATE_TRANSPORT_CLOSED))
-       return SESSION_TX_OK;
+      if (PREDICT_FALSE (ctx->s->session_state >=
+                        SESSION_STATE_TRANSPORT_CLOSED))
+       {
+         svm_fifo_unset_event (ctx->s->tx_fifo);
+         return SESSION_TX_OK;
+       }
       max_burst -= n_custom_tx;
       if (!max_burst || (ctx->s->flags & SESSION_F_CUSTOM_TX))
        {