]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: config keyword transaction logic fix 8458/head
authorPhilippe Antoine <pantoine@oisf.net>
Mon, 25 Jul 2022 08:33:42 +0000 (10:33 +0200)
committerVictor Julien <vjulien@oisf.net>
Wed, 25 Jan 2023 21:38:48 +0000 (22:38 +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
(cherry picked from commit 0c0fcc94111b183ae2953f659d14ab2f671fc019)

src/output-tx.c

index ff11b879448f0f1de560d07a1e7dccb3fe6b0a90..3a7eba9662686fb7825fd86e26536ea11b325ea9 100644 (file)
@@ -225,6 +225,8 @@ static TmEcode OutputTxLog(ThreadVars *tv, Packet *p, void *thread_data)
         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);
+            // so that AppLayerParserTransactionsCleanup can clean this tx
+            txd->logged.flags |= logger_expectation;
             goto next_tx;
         }