From b1c22169f8efce1baecacbbb312c6d4f37443928 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 22 Aug 2022 19:16:06 +0200 Subject: [PATCH] files: don't set NOSTORE in 'store all' case --- src/util-file.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/util-file.c b/src/util-file.c index fdf504ad8f..aa36750fb9 100644 --- a/src/util-file.c +++ b/src/util-file.c @@ -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; + } } } }