Purge 4.2BSD TCP tasks in FIN_WAIT_2
John Quarterman
jsq at ut-sally.UUCP
Sat Apr 20 10:36:46 AEST 1985
If you have many connections to TOPS-20 hosts, you will accumulate
FIN_WAIT_2 state connections rapidly. Here is a kludge that we have
used at U. Texas for about two years, in 2.8BSD, 4.1C BSD, and 4.2BSD.
It puts a timeout on the FIN_WAIT_2 state only (no effect on ordinary
established telnet/ftp/rcp/rlogin connections). It violates the TCP
spec in that there is no such timeout in the spec. However, we have
never seen any ill effects from it, nor had any complaints, and it
does away with the hanging FIN_WAIT_2 connections.
*** tcp_input.c.orig Wed Apr 17 15:47:38 1985
--- tcp_input.c Wed Apr 17 15:48:06 1985
***************
*** 530,535
if (so->so_state & SS_CANTRCVMORE)
soisdisconnected(so);
tp->t_state = TCPS_FIN_WAIT_2;
}
break;
--- 530,536 -----
if (so->so_state & SS_CANTRCVMORE)
soisdisconnected(so);
tp->t_state = TCPS_FIN_WAIT_2;
+ tp->t_timer[TCPT_2MSL] = 2 * TCPTV_MSL;
}
break;
--
John Quarterman, jsq at ut-sally.ARPA, {ihnp4,seismo,ctvax}!ut-sally!jsq
More information about the Comp.unix.wizards
mailing list