Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jul 2024 17:15:58 GMT
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 37b3e6a660f5 - main - tcp: use TCP_MAXWIN instead of 65535
Message-ID:  <202407221715.46MHFw0e071696@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=37b3e6a660f551ceda412e2115748f3b97b2e615

commit 37b3e6a660f551ceda412e2115748f3b97b2e615
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2024-07-22 06:52:12 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2024-07-22 06:52:12 +0000

    tcp: use TCP_MAXWIN instead of 65535
    
    This is suggested by cc@. No functional change.
    
    Sponsored by:   Netflix, Inc.
---
 sys/netinet/tcp_input.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index ef24f20f784a..ad17a9fdfb93 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -2443,7 +2443,7 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th,
 	/*
 	 * Ack processing.
 	 */
-	if (SEQ_GEQ(tp->snd_una, tp->iss + (65535 << tp->snd_scale))) {
+	if (SEQ_GEQ(tp->snd_una, tp->iss + (TCP_MAXWIN << tp->snd_scale))) {
 		/* Checking SEG.ACK against ISS is definitely redundant. */
 		tp->t_flags2 |= TF2_NO_ISS_CHECK;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202407221715.46MHFw0e071696>