output/tx: implement filtering

pull/5169/head
Victor Julien 5 years ago
parent e15995e2d2
commit df27205451

@ -1,4 +1,4 @@
/* Copyright (C) 2007-2013 Open Information Security Foundation
/* Copyright (C) 2007-2020 Open Information Security Foundation
*
* You can copy, redistribute or modify this Program under the terms of
* the GNU General Public License version 2 as published by the Free
@ -209,6 +209,14 @@ static TmEcode OutputTxLog(ThreadVars *tv, Packet *p, void *thread_data)
tx_id = ires.tx_id;
AppLayerTxData *txd = AppLayerParserGetTxData(ipproto, alproto, tx);
if (txd) {
SCLogDebug("tx %p/%"PRIu64" txd %p: log_flags %x", tx, tx_id, txd, txd->config.log_flags);
if (txd->config.log_flags & BIT_U8(CONFIG_TYPE_TX)) {
SCLogDebug("SKIP tx %p/%"PRIu64, tx, tx_id);
goto next_tx;
}
}
if (list[ALPROTO_UNKNOWN] != 0) {
OutputTxLogList0(tv, op_thread_data, p, f, tx, tx_id);
if (list[alproto] == NULL)

@ -38,6 +38,8 @@
#include "output-streaming.h"
#include "output-stats.h"
#include "util-config.h"
typedef struct OutputInitResult_ {
OutputCtx *ctx;
bool ok;

Loading…
Cancel
Save