tcp: retransmit fins in last-ack 57/40357/2
authorFlorin Coras <fcoras@cisco.com>
Sat, 17 Feb 2024 02:36:32 +0000 (18:36 -0800)
committerFlorin Coras <florin.coras@gmail.com>
Sat, 17 Feb 2024 02:25:07 +0000 (02:25 +0000)
Fix instances where timers are reset after programming fin.

Type: fix

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

src/vnet/tcp/tcp.c
src/vnet/tcp/tcp_input.c

index c7121b4..a6eb35a 100644 (file)
@@ -410,8 +410,8 @@ tcp_connection_close (tcp_connection_t * tc)
     case TCP_STATE_CLOSE_WAIT:
       if (!transport_max_tx_dequeue (&tc->connection))
        {
-         tcp_send_fin (tc);
          tcp_connection_timers_reset (tc);
+         tcp_send_fin (tc);
          tcp_connection_set_state (tc, TCP_STATE_LAST_ACK);
          tcp_timer_update (&wrk->timer_wheel, tc, TCP_TIMER_WAITCLOSE,
                            tcp_cfg.lastack_time);
index c069a9b..914295a 100644 (file)
@@ -2231,8 +2231,8 @@ tcp46_rcv_process_inline (vlib_main_t *vm, vlib_node_runtime_t *node,
          if (max_deq > tc->burst_acked)
            break;
 
-         tcp_send_fin (tc);
          tcp_connection_timers_reset (tc);
+         tcp_send_fin (tc);
          tcp_connection_set_state (tc, TCP_STATE_LAST_ACK);
          tcp_timer_set (&wrk->timer_wheel, tc, TCP_TIMER_WAITCLOSE,
                         tcp_cfg.lastack_time);