From 9a5bf82ba53a3ba424f75719270f5f2f6fc782d2 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 7 Oct 2014 11:27:54 +0200 Subject: [PATCH] tcp session reuse: reset detect state Reset the detect state on TCP session reuse. We reset the app layer, so we need to reset the stateful detection as well. --- src/stream-tcp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/stream-tcp.c b/src/stream-tcp.c index 8bc4972b8c..3c74d54a3c 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -4444,6 +4444,11 @@ int StreamTcpPacket (ThreadVars *tv, Packet *p, StreamTcpThread *stt, ~FLOW_TS_PP_ALPROTO_DETECT_DONE & ~FLOW_TC_PM_ALPROTO_DETECT_DONE & ~FLOW_TC_PP_ALPROTO_DETECT_DONE); + if (p->flow->de_state != NULL) { + SCMutexLock(&p->flow->de_state_m); + DetectEngineStateReset(p->flow->de_state, (STREAM_TOSERVER | STREAM_TOCLIENT)); + SCMutexUnlock(&p->flow->de_state_m); + } if (StreamTcpPacketStateNone(tv,p,stt,ssn, &stt->pseudo_queue)) { goto error; -- 2.47.2