From: Victor Julien Date: Tue, 17 Mar 2015 10:48:17 +0000 (+0100) Subject: Bug 1401: on midstream pickup, fix packet direction X-Git-Tag: suricata-2.1beta4~137 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1383%2Fhead;p=thirdparty%2Fsuricata.git Bug 1401: on midstream pickup, fix packet direction On midstream SYN/ACK pickups, we would flip the direction of packets after the first. This meant the first (pickup) packet's direction was wrong. This patch fixes that. --- diff --git a/src/stream-tcp.c b/src/stream-tcp.c index 28ef48f755..d414186bf8 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -913,6 +913,9 @@ static int StreamTcpPacketStateNone(ThreadVars *tv, Packet *p, "SACK permitted for both sides", ssn); } + /* packet thinks it is in the wrong direction, flip it */ + StreamTcpPacketSwitchDir(ssn, p); + } else if (p->tcph->th_flags & TH_SYN) { if (ssn == NULL) { ssn = StreamTcpNewSession(p, stt->ssn_pool_id);