From: Victor Julien Date: Fri, 14 Mar 2014 08:50:16 +0000 (+0100) Subject: fast-log: restore logging of Drop/wDrop X-Git-Tag: suricata-2.0rc3~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F894%2Fhead;p=thirdparty%2Fsuricata.git fast-log: restore logging of Drop/wDrop Restore drop print logic. Probably got lost in large refactoring round introducing log APIs. Bug #1138. --- diff --git a/src/alert-fastlog.c b/src/alert-fastlog.c index d703175341..feab6b9b8a 100644 --- a/src/alert-fastlog.c +++ b/src/alert-fastlog.c @@ -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) {