]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
tcp session reuse: reset detect state 1153/head
authorVictor Julien <victor@inliniac.net>
Tue, 7 Oct 2014 09:27:54 +0000 (11:27 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 7 Oct 2014 09:27:54 +0000 (11:27 +0200)
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

index 8bc4972b8cb95c8c419b902dc53f4fa95cd60c82..3c74d54a3cae70c6bc784d5384fef8343df263b4 100644 (file)
@@ -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;