From owner-freebsd-hackers Fri May 22 17:24:08 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA26254 for freebsd-hackers-outgoing; Fri, 22 May 1998 17:24:08 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from biggusdiskus.flyingfox.com (biggusdiskus.flyingfox.com [205.162.1.28]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA26198 for ; Fri, 22 May 1998 17:23:59 -0700 (PDT) (envelope-from jas@flyingfox.com) Received: (from jas@localhost) by biggusdiskus.flyingfox.com (8.8.5/8.8.5) id RAA04614; Fri, 22 May 1998 17:25:11 -0700 (PDT) Date: Fri, 22 May 1998 17:25:11 -0700 (PDT) From: Jim Shankland Message-Id: <199805230025.RAA04614@biggusdiskus.flyingfox.com> To: tlambert@primenet.com Subject: Re: TIME_WAIT/FIN_WAIT_2... Cc: hackers@FreeBSD.ORG Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I think it's you that are mixed up... see the Apache FAQ on FIN_WAIT_2, > and contact Paul Vixie, as I've suggested. Let's assume that we mostly differ on terminology. (I confess I get slightly disoriented by phrases like, "Wait for the LAST-ACK," and "If you get a CLOSE_WAIT" -- these being TCP states, not messages. However, I think I can figure out what you mean.) You are, in effect, suggesting turning on a keepalive with a short timeout (overriding the normal retry timer) whenever a connection is in FIN_WAIT_2 and the socket is closed. After 2 MSL in the state "FIN_WAIT_2-and-the-socket-has-been-closed," you send a keepalive. If the peer responds with a RST, you tear the connection down. If the peer responds with its own FIN within the next 2 MSL, you go through the normal close sequence. If the peer doesn't respond at all, then after the second 2MSL wait, you tear the connection down.You don't state what you would do if the peer merely ACKs the keepalive; presumably keep the connection up, and probe it again later (how much later?) with another keepalive? I dunno; might be marginally better than just tearing the connection down after a few minutes. CGEW. btw, whoever it was who said, "Don't do this because rsh uses half-open connections" -- you missed a key point. None of this applies if the application process still has the socket open. This only applies when the application has entirely closed the socket, so there's nobody there to receive any data that might arrive. Jim Shankland Flying Fox Computer Systems, Inc. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message