From: Philippe Antoine Date: Mon, 25 Jul 2022 08:33:42 +0000 (+0200) Subject: detect: config keyword transaction logic fix X-Git-Tag: suricata-7.0.0-rc1~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c0fcc94111b183ae2953f659d14ab2f671fc019;p=thirdparty%2Fsuricata.git detect: config keyword transaction logic fix When the keyword config:logging disable,type tx is used, OutputTxLog checks a flag to skip the transaction without logging it, but AppLayerParserTransactionsCleanup waits for the transaction to be marked as logged to clean it. So, OutputTxLog now marks the tx as logged, so that it can get cleaned away. Ticket: #5456 --- diff --git a/src/output-tx.c b/src/output-tx.c index 6ddbdd1f62..25d7a03bc3 100644 --- a/src/output-tx.c +++ b/src/output-tx.c @@ -480,6 +480,8 @@ static TmEcode OutputTxLog(ThreadVars *tv, Packet *p, void *thread_data) txd->config.log_flags, logger_expectation); if (txd->config.log_flags & BIT_U8(CONFIG_TYPE_TX)) { SCLogDebug("SKIP tx %p/%"PRIu64, tx, tx_id); + // so that AppLayerParserTransactionsCleanup can clean this tx + txd->logged.flags |= logger_expectation; goto next_tx; }