From owner-p4-projects@FreeBSD.ORG Thu Jun 19 13:20:03 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5D61B1065673; Thu, 19 Jun 2008 13:20:03 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BA62106566C for ; Thu, 19 Jun 2008 13:20:03 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 01F808FC16 for ; Thu, 19 Jun 2008 13:20:03 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m5JDK20I001790 for ; Thu, 19 Jun 2008 13:20:02 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m5JDK2Xb001788 for perforce@freebsd.org; Thu, 19 Jun 2008 13:20:02 GMT (envelope-from rpaulo@FreeBSD.org) Date: Thu, 19 Jun 2008 13:20:02 GMT Message-Id: <200806191320.m5JDK2Xb001788@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo To: Perforce Change Reviews Cc: Subject: PERFORCE change 143761 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2008 13:20:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=143761 Change 143761 by rpaulo@rpaulo_sigma on 2008/06/19 13:19:41 Ignore syn/ack for connections we have seen no syn. Affected files ... .. //depot/projects/soc2008/rpaulo-tcpad/handler.c#7 edit Differences ... ==== //depot/projects/soc2008/rpaulo-tcpad/handler.c#7 (text+ko) ==== @@ -23,7 +23,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/soc2008/rpaulo-tcpad/handler.c#6 $ + * $P4: //depot/projects/soc2008/rpaulo-tcpad/handler.c#7 $ */ #include @@ -99,6 +99,12 @@ TAILQ_INIT(cp->pktshead); dumper_addpkt(cp->pktshead, ph, bytes); } else if ((tcp->th_flags & TH_FLAGS) == (TH_SYN|TH_ACK)) { + if (rcp == NULL) { + /* ignore this syn+ack because we missed + the earlier syn. + */ + return; + } if (cp) { DPRINTF("connection already being tracked!\n"); print_packet(bytes, linkhlen);