tcp: fix fin retransmit when out of buffers 96/40396/3
authorFlorin Coras <fcoras@cisco.com>
Mon, 26 Feb 2024 01:35:21 +0000 (17:35 -0800)
committerDave Barach <vpp@barachs.net>
Mon, 26 Feb 2024 18:43:48 +0000 (18:43 +0000)
Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I787825dea7f82748537cc4372104cc6647cf2132

src/vnet/tcp/tcp_output.c

index e6c87b6..f157b78 100644 (file)
@@ -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;