]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
unified2: more udp fixes
authorVictor Julien <victor@inliniac.net>
Tue, 23 Apr 2013 14:08:16 +0000 (16:08 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 23 Apr 2013 15:34:20 +0000 (17:34 +0200)
src/alert-unified2-alert.c

index 04388f5bc0664b38c099b7e8c11772a682df4c2a..1df7db6bc72d4b7260a062f5a5894b581fbdec74 100644 (file)
@@ -877,8 +877,9 @@ int Unified2IPv4TypeAlert (ThreadVars *tv, Packet *p, void *data, PacketQueue *p
         /* Write the alert (it doesn't lock inside, since we
          * already locked here for rotation check)
          */
-        ret = Unified2PacketTypeAlert(aun, p, event_id,
-                pa->flags & (PACKET_ALERT_FLAG_STATE_MATCH|PACKET_ALERT_FLAG_STREAM_MATCH) ? 1 : 0);
+        int stream = (gphdr.protocol == IPPROTO_TCP) ?
+            (pa->flags & (PACKET_ALERT_FLAG_STATE_MATCH|PACKET_ALERT_FLAG_STREAM_MATCH) ? 1 : 0) : 0;
+        ret = Unified2PacketTypeAlert(aun, p, event_id, stream);
         if (ret != 1) {
             aun->file_ctx->alerts += i;
             SCMutexUnlock(&aun->file_ctx->fp_mutex);