From 60a49657df10d6d14f087037593fd8ef4daf07d5 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 17 Mar 2015 11:48:17 +0100 Subject: [PATCH] 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. --- src/stream-tcp.c | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.47.2