From: Florin Coras Date: Fri, 1 Aug 2025 23:32:40 +0000 (-0400) Subject: tcp: fix persist handler in closed state X-Git-Tag: v26.02-rc0~128 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F14%2F43514%2F4;p=vpp.git tcp: fix persist handler in closed state Do not rechedule connection if persist handler is called after connection is closed. Type: fix Change-Id: Ibe7c3924c6fb107a36e4d459f32a39e49a0b7ae1 Signed-off-by: Florin Coras --- diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c index 120ad6c533e..d68c86b2330 100644 --- a/src/vnet/tcp/tcp_output.c +++ b/src/vnet/tcp/tcp_output.c @@ -1536,9 +1536,11 @@ tcp_timer_persist_handler (tcp_connection_t * tc) tcp_worker_stats_inc (wrk, to_persist, 1); + if (tc->state == TCP_STATE_CLOSED) + return; + /* Problem already solved or worse */ - if (tc->state == TCP_STATE_CLOSED || tc->snd_wnd > tc->snd_mss - || (tc->flags & TCP_CONN_FINSNT)) + if (tc->snd_wnd > tc->snd_mss || (tc->flags & TCP_CONN_FINSNT)) goto update_scheduler; available_bytes = transport_max_tx_dequeue (&tc->connection);