Date: Fri, 23 Mar 2001 08:46:41 +0800 From: David Xu <bsddiy@21cn.com> To: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> Cc: freebsd-bugs@FreeBSD.org Subject: Re[2]: kern/25986: Socket would hang at LAST_ACK forever. Message-ID: <135756057.20010323084641@21cn.com> In-Reply-To: <200103221610.f2MGA5673743@freefall.freebsd.org> References: <200103221610.f2MGA5673743@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <wollman@khavrinen.lcs.mit.edu> GW> To: David Xu <bsddiy@21cn.com> 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> <<On Thu, 22 Mar 2001 01:10:02 -0800 (PST), David Xu <bsddiy@21cn.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?135756057.20010323084641>