From b1454f89b595f480ee0ae23174ae9ab9a78100ef Mon Sep 17 00:00:00 2001 From: emmanuel Date: Thu, 21 Dec 2023 01:55:41 -0800 Subject: session: unset fifo evt to enqueue ack evt on tcp timewait 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 --- src/vnet/session/session_node.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c index 4e190df1e99..01dd669c5e5 100644 --- a/src/vnet/session/session_node.c +++ b/src/vnet/session/session_node.c @@ -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)) { -- cgit 1.2.3-korg