]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
xff: don't do xff check if there are no alerts anyway.
authorVictor Julien <victor@inliniac.net>
Thu, 12 Sep 2013 15:00:13 +0000 (17:00 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 12 Sep 2013 15:00:13 +0000 (17:00 +0200)
src/alert-unified2-alert.c

index 85e9a8c7bfcd406bcb440bdfcda358c51216b888..fdbf77568cb11ef6995e30a630f23cf2f99f55da 100644 (file)
@@ -385,6 +385,9 @@ TmEcode Unified2Alert (ThreadVars *t, Packet *p, void *data, PacketQueue *pq, Pa
     Unified2AlertThread *aun = (Unified2AlertThread *)data;
     aun->xff_flags = UNIFIED2_ALERT_XFF_DISABLED;
 
+    if (p->alerts.cnt == 0)
+        return TM_ECODE_OK;
+
     if (!(aun->unified2alert_ctx->xff_mode & UNIFIED2_ALERT_XFF_DISABLED) &&
             p->flow != NULL) {
         FLOWLOCK_RDLOCK(p->flow);