NetBSD Problem Report #13952

Received: (qmail 17629 invoked from network); 15 Sep 2001 10:09:19 -0000
Message-Id: <200109151013.f8FADbD00422@viola.watersprings.org>
Date: Sat, 15 Sep 2001 19:13:37 +0900 (JST)
From: demizu@dd.iij4u.or.jp
Reply-To: demizu@dd.iij4u.or.jp
To: gnats-bugs@gnats.netbsd.org
Subject: TCP window info update check seems to be incorrect.
X-Send-Pr-Version: 3.95

>Number:         13952
>Category:       kern
>Synopsis:       TCP window information update check seems to be incorrect.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    rpaulo
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Sep 15 10:10:00 +0000 2001
>Closed-Date:    Sat Feb 18 17:35:53 +0000 2006
>Last-Modified:  Sat Feb 18 17:35:53 +0000 2006
>Originator:     Noritoshi Demizu
>Release:        NetBSD 1.5.2
>Organization:
>Environment:
System: NetBSD viola.watersprings.org 1.5.2 NetBSD 1.5.2 (VIOLA) #1: Sat Sep 15 18:18:38 JST 2001 noritosi@viola.watersprings.org:/home/NetBSD/src/sys-152/arch/i386/compile/VIOLA i386

>Description:
	Current if-test to check if TCP window information should be updated
	seems to be incorrect.  This is introduced at revision 1.23 of
	tcp_input.c.  OpenBSD 2.7 has the same if-test.

>How-To-Repeat:
>Fix:
	I belive following patch makes the meanings of the if-test
	the same with revision 1.22 or before of tcp_input.c.
	FreeBSD has the same if-test with this patch, except indentations.

--- tcp_input.c-ORG	Thu May 10 04:37:19 2001
+++ tcp_input.c	Sat Sep 15 18:18:05 2001
@@ -1919,14 +1919,14 @@
 step6:
 	/*
 	 * Update window information.
 	 * Don't look at window if no ACK: TAC's send garbage on first SYN.
 	 */
 	if ((tiflags & TH_ACK) && (SEQ_LT(tp->snd_wl1, th->th_seq) ||
-	    (tp->snd_wl1 == th->th_seq && SEQ_LT(tp->snd_wl2, th->th_ack)) ||
-	    (tp->snd_wl2 == th->th_ack && tiwin > tp->snd_wnd))) {
+	    (tp->snd_wl1 == th->th_seq && (SEQ_LT(tp->snd_wl2, th->th_ack) ||
+	    (tp->snd_wl2 == th->th_ack && tiwin > tp->snd_wnd))))) {
 		/* keep track of pure window updates */
 		if (tlen == 0 &&
 		    tp->snd_wl2 == th->th_ack && tiwin > tp->snd_wnd)
 			tcpstat.tcps_rcvwinupd++;
 		tp->snd_wnd = tiwin;
 		tp->snd_wl1 = th->th_seq;
>Release-Note:
>Audit-Trail:
From: Rui Paulo <rpaulo@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/13952 CVS commit: src/sys/netinet
Date: Sat, 18 Feb 2006 17:34:49 +0000 (UTC)

 Module Name:	src
 Committed By:	rpaulo
 Date:		Sat Feb 18 17:34:49 UTC 2006

 Modified Files:
 	src/sys/netinet: tcp_input.c

 Log Message:
 PR 13952: Noritoshi Demizu: correct the TCP window information update check.


 To generate a diff of this commit:
 cvs rdiff -r1.238 -r1.239 src/sys/netinet/tcp_input.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: kern-bug-people->rpaulo
Responsible-Changed-By: rpaulo@netbsd.org
Responsible-Changed-When: Sat, 18 Feb 2006 17:35:53 +0000
Responsible-Changed-Why:
mine


State-Changed-From-To: open->closed
State-Changed-By: rpaulo@netbsd.org
State-Changed-When: Sat, 18 Feb 2006 17:35:53 +0000
State-Changed-Why:
should be fixed. thanks!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.