From: Victor Julien Date: Tue, 23 Apr 2013 14:08:16 +0000 (+0200) Subject: unified2: more udp fixes X-Git-Tag: suricata-2.0beta1~156 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4b3166b193757924c4d4275794975d3392f6f67d;p=thirdparty%2Fsuricata.git unified2: more udp fixes --- diff --git a/src/alert-unified2-alert.c b/src/alert-unified2-alert.c index 04388f5bc0..1df7db6bc7 100644 --- a/src/alert-unified2-alert.c +++ b/src/alert-unified2-alert.c @@ -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);