From owner-freebsd-net Mon Jun 25 23:29:31 2001 Delivered-To: freebsd-net@freebsd.org Received: from info.iet.unipi.it (info.iet.unipi.it [131.114.9.184]) by hub.freebsd.org (Postfix) with ESMTP id D6CBF37B40D for ; Mon, 25 Jun 2001 23:29:09 -0700 (PDT) (envelope-from luigi@info.iet.unipi.it) Received: (from luigi@localhost) by info.iet.unipi.it (8.9.3/8.9.3) id IAA94869; Tue, 26 Jun 2001 08:24:13 +0200 (CEST) (envelope-from luigi) From: Luigi Rizzo Message-Id: <200106260624.IAA94869@info.iet.unipi.it> Subject: Re: TCPS_HAVERCVDFIN not considering all possible conditions? In-Reply-To: <45D08C2C.558913DD.375A6AF3@netscape.net> from "FastPathNow@netscape.net" at "Jun 25, 2001 09:11:45 pm" To: FastPathNow@netscape.net Date: Tue, 26 Jun 2001 08:24:13 +0200 (CEST) Cc: freebsd-net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL61 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org this macro suggests that it would be better to define tcp states as a set of individual bits, so one does not have to do arithmetics on state IDs. cheers luigi > Currently in tcp_fsm.h its defined as : > #define TCPS_HAVERCVDFIN(s) ((s) >= TCPS_TIME_WAIT) > > when IMHO it should be: (to consider all possible cases of having recd a FIN?) > > #define TCPS_HAVERCVDFIN(s) ( ((s) >= TCPS_TIME_WAIT) || ((s) == TCPS_CLOSE_WAIT) || ((s) == TCPS_LAST_ACK) || ((s) == TCPS_CLOSING) ) > > -AG > > __________________________________________________________________ > Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/ > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message