Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ut-sally.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!ut-sally!jsq From: jsq@ut-sally.UUCP (John Quarterman) Newsgroups: net.unix-wizards Subject: Re: Purge 4.2BSD TCP tasks in FIN_WAIT_2 Message-ID: <1661@ut-sally.UUCP> Date: Fri, 19-Apr-85 19:36:46 EST Article-I.D.: ut-sally.1661 Posted: Fri Apr 19 19:36:46 1985 Date-Received: Sun, 21-Apr-85 04:27:31 EST References: <377@wdl1.UUCP> Reply-To: jsq@ut-sally.UUCP (John Quarterman) Organization: U. Texas CS Dept., Austin, Texas Lines: 33 Keywords: TCP, FIN_WAIT_2 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@ut-sally.ARPA, {ihnp4,seismo,ctvax}!ut-sally!jsq