Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site sdcc3.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!hao!hplabs!sdcrdcf!sdcsvax!sdcc3!muller From: muller@sdcc3.UUCP (Keith Muller) Newsgroups: net.unix-wizards,net.bugs.4bsd Subject: Posted bug fix to netinet/tcp_input.c breaks rsh Message-ID: <2639@sdcc3.UUCP> Date: Fri, 18-Jan-85 03:34:04 EST Article-I.D.: sdcc3.2639 Posted: Fri Jan 18 03:34:04 1985 Date-Received: Mon, 21-Jan-85 04:29:42 EST Organization: U.C. San Diego, Academic Computer Center Lines: 79 Xref: watmath net.unix-wizards:11643 net.bugs.4bsd:1333 ed /tmp/timescript. rcp timescript remotemach:/tmp/timescript 3) run the following rsh remotemach -n /tmp/timescript 4) only the first echo will print. while the sleep is running the virtual stream will be shut down. BOTH echos should print. Fix: The following posted bug fix: >From: mike@BRL-VGR.ARPA >Newsgroups: net.unix-wizards >Subject: Tune TCP max seg size, source correct local addresses. >Message-ID: <13000@sri-arpa.UUCP> >Date: Fri, 12-Oct-84 00:14:54 PDT >Date-Received: Mon, 15-Oct-84 12:10:51 PDT >Lines: 384 > >From: Mike Muuss> >Index: /sys/netinet/tcp_input.c 4.2BSD Fix > >Description: > >1) Tune TCP max segment size based upon IP interface MTU. >*************** /sys/netinet/tcp_input.c >*** 530,535 > if (so->so_state & SS_CANTRCVMORE) soisdisconnected(so); > tp->t_state = TCPS_FIN_WAIT_2; > } > break; >--- 536,542 ----- > if (so->so_state & SS_CANTRCVMORE) > soisdisconnected(so); > tp->t_state = TCPS_FIN_WAIT_2; >+ tp->t_timer[TCPT_2MSL] = 2 * TCPTV_MSL; > } > break; The addition of the line marked with a "+" seems to be an attempt to fix TCP connections that were hanging in the FIN_WAIT_2 state. This fix not only violates the TCP specs but even worse causes half closed connections to suddenly abort even though the open half is still transferring data (such as the rsh script shown above). This will only happen on half open connections that last longer than 2*TCPTV_MSL. The rest of the fix from muss@brl is excellent and should be installed. Just do not add the "+" marked line: tp->t_timer[TCPT_2MSL] = 2 * TCPTV_MSL; to netinet/tcp_input.c Keith Muller University of California Academic Computer Center ucbvax!sdcsvax!muller (619) 452-6090