pd: don't reverse flow if TCP session not midstream

pull/4188/head
Victor Julien 5 years ago
parent 5f1d21f247
commit a272e433a8

@ -358,7 +358,7 @@ static int TCPProtoDetect(ThreadVars *tv,
/* if protocol detection indicated that we need to reverse
* the direction of the flow, do it now. We flip the flow,
* packet and the direction flags */
if (reverse_flow) {
if (reverse_flow && (ssn->flags & STREAMTCP_FLAG_MIDSTREAM)) {
SCLogDebug("reversing flow after proto detect told us so");
PacketSwap(p);
FlowSwap(f);

Loading…
Cancel
Save