]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: config keyword transaction logic fix
authorPhilippe Antoine <pantoine@oisf.net>
Mon, 25 Jul 2022 08:33:42 +0000 (10:33 +0200)
committerVictor Julien <vjulien@oisf.net>
Tue, 24 Jan 2023 12:45:07 +0000 (13:45 +0100)
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

src/output-tx.c

index 6ddbdd1f62469fa3a33e5b25f2cce825e0a91d25..25d7a03bc3135af74baec7e67d85b519527bfad7 100644 (file)
@@ -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;
         }