summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2024-02-25 17:35:21 -0800
committerDave Barach <vpp@barachs.net>2024-02-26 18:43:48 +0000
commit4e32bc6b6d4dcbaaca67f4e90d9e0cdfea73e344 (patch)
tree7524098de91ff565f5f7af386d208605b383da49 /src/vnet
parent5bce60353cb227fd9c39d3b8fefa2414c1c1c50f (diff)
tcp: fix fin retransmit when out of buffers
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I787825dea7f82748537cc4372104cc6647cf2132
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/tcp/tcp_output.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c
index e6c87b6a3d0..f157b78ff75 100644
--- a/src/vnet/tcp/tcp_output.c
+++ b/src/vnet/tcp/tcp_output.c
@@ -838,10 +838,9 @@ tcp_send_fin (tcp_connection_t * tc)
/* Out of buffers so program fin retransmit ASAP */
tcp_timer_update (&wrk->timer_wheel, tc, TCP_TIMER_RETRANSMIT,
tcp_cfg.alloc_err_timeout);
- if (fin_snt)
- tc->snd_nxt += 1;
- else
- /* Make sure retransmit retries a fin not data */
+ tc->snd_nxt += 1;
+ /* Make sure retransmit retries a fin not data with right snd_nxt */
+ if (!fin_snt)
tc->flags |= TCP_CONN_FINSNT;
tcp_worker_stats_inc (wrk, no_buffer, 1);
return;