Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jun 2008 13:20:02 GMT
From:      Rui Paulo <rpaulo@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 143761 for review
Message-ID:  <200806191320.m5JDK2Xb001788@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <stdio.h>
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806191320.m5JDK2Xb001788>