Posted bug fix to netinet/tcp_input.c breaks rsh
Keith Muller
muller at sdcc3.UUCP
Fri Jan 18 18:34:04 AEST 1985
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 at BRL-VGR.ARPA
>Newsgroups: net.unix-wizards
>Subject: Tune TCP max seg size, source correct local addresses.
>Message-ID: <13000 at 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 <mike at BRL-VGR.ARPA>
>
>Index: /sys/netinet/tcp_input.c 4.2BSD Fix
>
>Description:
>
>1) Tune TCP max segment size based upon IP interface MTU.
<deleted lines - muller>
>*************** /sys/netinet/tcp_input.c
<deleted lines - muller>
>*** 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 at 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
More information about the Comp.unix.wizards
mailing list