From owner-freebsd-bugs Thu Mar 22 16:38:20 2001 Delivered-To: freebsd-bugs@freebsd.org Received: from mail.viasoft.com.cn (unknown [61.153.1.177]) by hub.freebsd.org (Postfix) with ESMTP id B183937B71B for ; Thu, 22 Mar 2001 16:38:15 -0800 (PST) (envelope-from bsddiy@21cn.com) Received: from William ([192.168.1.98]) by mail.viasoft.com.cn (8.9.3/8.9.3) with ESMTP id IAA22110; Fri, 23 Mar 2001 08:34:31 +0800 Date: Fri, 23 Mar 2001 08:46:41 +0800 From: David Xu X-Mailer: The Bat! (v1.48f) Personal Reply-To: David Xu Organization: Viasoft X-Priority: 3 (Normal) Message-ID: <135756057.20010323084641@21cn.com> To: Garrett Wollman Cc: freebsd-bugs@FreeBSD.org Subject: Re[2]: kern/25986: Socket would hang at LAST_ACK forever. In-reply-To: <200103221610.f2MGA5673743@freefall.freebsd.org> References: <200103221610.f2MGA5673743@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hello Garrett, Friday, March 23, 2001, 12:10:05 AM, you wrote: GW> The following reply was made to PR kern/25986; it has been noted by GNATS. GW> From: Garrett Wollman GW> To: David Xu GW> Cc: freebsd-gnats-submit@FreeBSD.ORG GW> Subject: Re: kern/25986: Socket would hang at LAST_ACK forever. GW> Date: Thu, 22 Mar 2001 11:07:54 -0500 (EST) GW> < said: GW> > Thank you! GW> > it's a long standing bug, but seems no one want to fix it, don't know why! GW> Probably because this ``fix'' would violate the TCP specification. GW> (Not that we don't do that already for FINWAIT-2.) See the state GW> diagram in RFC 793, page 23. GW> There are three states in TCP in which the specification requires that GW> we wait indefinitely for the other end to say something on the way to GW> shutdown. In FINWAIT-2, we are waiting for a FIN from the other side, GW> but they have already acknowledged our FIN). Since TCP models a GW> dual-simplex octet stream, it is entirely legitimate for the other end GW> to continue to transmit data after it has acknowledged our FIN and GW> before it gives up itself. (They will be in CLOSE-WAIT when we are in GW> FINWAIT-2.) In CLOSING and LAST-ACK we are waiting for the other end GW> to acknowledge our FIN, them having already sent a FIN of their own. GW> CLOSING is an exceedingly difficult state to get into, since most TCPs GW> will ACK a FIN immediately, before delivering the end-of-session GW> indication to the listening process. GW> It is more dangerous to time out LAST-ACK than FINWAIT-2, because GW> FINWAIT-2 sockets normally transition into TIME-WAIT whereas LAST-ACK GW> sockets are destroyed immediately. GW> -GAWollman I would rather have a solid system than a theorization system can be DOS attacked. I think we can have a sysctl to control the behaviour. -- David Xu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message