]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
app-layer: don't check tx detect flags if detect is disabled
authorVictor Julien <victor@inliniac.net>
Sat, 19 Sep 2020 13:50:47 +0000 (15:50 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 25 Sep 2020 05:24:59 +0000 (07:24 +0200)
src/app-layer-parser.c

index d22a046977a17b364258ceb197c1df5d23021b1e..1004848339249e65a92f2f4e52ad74f0e027cb6e 100644 (file)
@@ -870,6 +870,7 @@ FileContainer *AppLayerParserGetFiles(const Flow *f, const uint8_t direction)
     SCReturnPtr(ptr, "FileContainer *");
 }
 
+extern int g_detect_disabled;
 /**
  * \brief remove obsolete (inspected and logged) transactions
  */
@@ -882,7 +883,7 @@ void AppLayerParserTransactionsCleanup(Flow *f)
     if (unlikely(p->StateTransactionFree == NULL))
         SCReturn;
 
-    const bool has_tx_detect_flags = (p->GetTxData != NULL);
+    const bool has_tx_detect_flags = (p->GetTxData != NULL && !g_detect_disabled);
     const uint8_t ipproto = f->proto;
     const AppProto alproto = f->alproto;
     void * const alstate = f->alstate;
@@ -948,7 +949,7 @@ void AppLayerParserTransactionsCleanup(Flow *f)
                 }
             }
         }
-        if (txd &&logger_expectation != 0) {
+        if (txd && logger_expectation != 0) {
             LoggerId tx_logged = GetTxLogged(txd);
             if (tx_logged != logger_expectation) {
                 SCLogDebug("%p/%"PRIu64" skipping: logging not done: want:%"PRIx32", have:%"PRIx32,