]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
stream: don't send empty streammsg at stream end 759/head
authorVictor Julien <victor@inliniac.net>
Wed, 18 Dec 2013 08:14:20 +0000 (09:14 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 10 Jan 2014 15:21:55 +0000 (16:21 +0100)
No longer send an empty StreamMsg through the engine on stream end,
the messages were ignored anyway.

src/stream-tcp-reassemble.c

index 3d8222d22b46bbd8642017f7338ef88152afd650..3b5e92b5ac0142b62c9a8e3360c0babcbb097bb0 100644 (file)
@@ -3057,21 +3057,7 @@ static int StreamTcpReassembleRaw (TcpReassemblyThreadCtx *ra_ctx,
         SCReturnInt(0);
 
     if (stream->seg_list == NULL) {
-        /* send an empty EOF msg if we have no segments but TCP state
-         * is beyond ESTABLISHED */
-        if (ssn->state > TCP_ESTABLISHED) {
-            StreamMsg *smsg = StreamMsgGetFromPool();
-            if (smsg == NULL) {
-                SCLogDebug("stream_msg_pool is empty");
-                SCReturnInt(-1);
-            }
-            StreamTcpSetupMsg(ssn, stream, p, smsg);
-            StreamTcpStoreStreamChunk(ssn, smsg, p, 0);
-
-        } else {
-            SCLogDebug("no segments in the list to reassemble");
-        }
-
+        SCLogDebug("no segments in the list to reassemble");
         SCReturnInt(0);
     }