]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
files: don't set NOSTORE in 'store all' case
authorVictor Julien <vjulien@oisf.net>
Mon, 22 Aug 2022 17:16:06 +0000 (19:16 +0200)
committerVictor Julien <vjulien@oisf.net>
Fri, 30 Sep 2022 07:46:06 +0000 (09:46 +0200)
src/util-file.c

index fdf504ad8fc618971f46a16a54c323ddb6af8aae..aa36750fb97606aee8415a9bdf808a043a0cf23c 100644 (file)
@@ -1147,12 +1147,14 @@ void FileUpdateFlowFileFlags(Flow *f, uint16_t set_file_flags, uint8_t direction
  */
 void FileDisableStoringForTransaction(Flow *f, const uint8_t direction, void *tx, uint64_t tx_id)
 {
-    AppLayerTxData *txd = AppLayerParserGetTxData(f->proto, f->alproto, tx);
-    if (txd != NULL) {
-        if (direction & STREAM_TOSERVER) {
-            txd->file_flags |= FLOWFILE_NO_STORE_TS;
-        } else {
-            txd->file_flags |= FLOWFILE_NO_STORE_TC;
+    if (g_file_force_filestore == 0) {
+        AppLayerTxData *txd = AppLayerParserGetTxData(f->proto, f->alproto, tx);
+        if (txd != NULL) {
+            if (direction & STREAM_TOSERVER) {
+                txd->file_flags |= FLOWFILE_NO_STORE_TS;
+            } else {
+                txd->file_flags |= FLOWFILE_NO_STORE_TC;
+            }
         }
     }
 }