Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Apr 2026 07:59:17 +0000
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 88603890a770 - stable/15 - tcp: improve handling of segments in TIME WAIT
Message-ID:  <69edc5d5.26d14.3aa23795@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/15 has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=88603890a7702464af837cf373e792697c5335e9

commit 88603890a7702464af837cf373e792697c5335e9
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2026-02-25 13:06:15 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2026-04-26 07:57:44 +0000

    tcp: improve handling of segments in TIME WAIT
    
    The check for excluding duplicate ACKs needs to consider only TH_SYN
    and TH_FIN. We know that TH_ACK is set and TH_RST is cleared. All
    other flags, in particular TH_ECE, TH_CWR, and TH_AE needs to be
    ignored for the check.
    
    PR:                     292293
    Reviewed by:            rrs
    Sponsored by:           Netflix, Inc.
    Differential Revision:  https://reviews.freebsd.org/D55489
    Event:                  Wiesbaden Hackathon 2026
    
    (cherry picked from commit f3364d3c8c876074a9a6f68168e5eb8bd60207de)
---
 sys/netinet/tcp_timewait.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c
index 5032f5bf4c28..66103f8d0b11 100644
--- a/sys/netinet/tcp_timewait.c
+++ b/sys/netinet/tcp_timewait.c
@@ -330,7 +330,7 @@ tcp_twcheck(struct inpcb *inp, struct tcpopt *to, struct tcphdr *th,
 	/*
 	 * Acknowledge the segment if it has data or is not a duplicate ACK.
 	 */
-	if (thflags != TH_ACK || tlen != 0 ||
+	if ((thflags & (TH_SYN | TH_FIN)) != 0 || tlen != 0 ||
 	    th->th_seq != tp->rcv_nxt || th->th_ack != tp->snd_nxt) {
 		TCP_LOG_EVENT(tp, th, NULL, NULL, TCP_LOG_IN, 0, tlen, NULL,
 		    true);


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69edc5d5.26d14.3aa23795>