diff options
author | emmanuel <emmanuelscaria11@gmail.com> | 2023-12-21 01:55:41 -0800 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2023-12-22 16:27:48 +0000 |
commit | b1454f89b595f480ee0ae23174ae9ab9a78100ef (patch) | |
tree | 9ac53f6f9a0856828632aafd029fd67d6d2f0c8b /src/vnet/session/session_node.c | |
parent | e1489260caaf2e3c600f761337a16b0d668376bb (diff) |
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 <emmanuelscaria11@gmail.com>
Diffstat (limited to 'src/vnet/session/session_node.c')
-rw-r--r-- | src/vnet/session/session_node.c | 9 |
1 files 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)) { |