]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
fast-log: restore logging of Drop/wDrop 894/head
authorVictor Julien <victor@inliniac.net>
Fri, 14 Mar 2014 08:50:16 +0000 (09:50 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 14 Mar 2014 08:50:16 +0000 (09:50 +0100)
Restore drop print logic. Probably got lost in large refactoring round
introducing log APIs.

Bug #1138.

src/alert-fastlog.c

index d7031753418589dc4f4fd26d2bf1280ed2b44f1c..feab6b9b8a5018286af3a1fe3e21988aa58a73db 100644 (file)
@@ -115,8 +115,8 @@ int AlertFastLogger(ThreadVars *tv, void *data, const Packet *p)
     AlertFastLogThread *aft = (AlertFastLogThread *)data;
     int i;
     char timebuf[64];
-    char *action = "";
     int decoder_event = 0;
+    extern uint8_t engine_mode;
 
     CreateTimeString(&p->ts, timebuf, sizeof(timebuf));
 
@@ -145,6 +145,13 @@ int AlertFastLogger(ThreadVars *tv, void *data, const Packet *p)
             continue;
         }
 
+        char *action = "";
+        if ((pa->action & ACTION_DROP) && IS_ENGINE_MODE_IPS(engine_mode)) {
+            action = "[Drop] ";
+        } else if (pa->action & ACTION_DROP) {
+            action = "[wDrop] ";
+        }
+
         char proto[16] = "";
         if (likely(decoder_event == 0)) {
             if (SCProtoNameValid(IP_GET_IPPROTO(p)) == TRUE) {