From 70efc66e33cc84b57773d059ab27001b403fc419 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 14 Mar 2014 09:50:16 +0100 Subject: [PATCH] fast-log: restore logging of Drop/wDrop Restore drop print logic. Probably got lost in large refactoring round introducing log APIs. Bug #1138. --- src/alert-fastlog.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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) { -- 2.47.2