]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
tcp reuse: don't double 'reuse'
authorVictor Julien <victor@inliniac.net>
Tue, 17 Feb 2015 12:01:52 +0000 (13:01 +0100)
committerVictor Julien <victor@inliniac.net>
Wed, 18 Feb 2015 08:18:43 +0000 (09:18 +0100)
If the flow engine already reused a flow then the stream engine
won't have to do the same.

src/stream-tcp.c

index 54b76dc2add89d6e23d413892cbe18c2ea42e999..a8c0e37b5b082bc4872c5fc3649a7dc74b5d7470 100644 (file)
@@ -4999,10 +4999,12 @@ TmEcode StreamTcp (ThreadVars *tv, Packet *p, void *data, PacketQueue *pq, Packe
             if (p->flow == NULL)
                 return ret;
 
-            /* after that, check for 'new' reuse */
-            TcpSessionReuseHandle(p);
-            if (p->flow == NULL)
-                return ret;
+            if (!(p->flowflags & FLOW_PKT_TOSERVER_FIRST)) {
+                /* after that, check for 'new' reuse */
+                TcpSessionReuseHandle(p);
+                if (p->flow == NULL)
+                    return ret;
+            }
         }
     }
     AppLayerProfilingReset(stt->ra_ctx->app_tctx);