From: Victor Julien Date: Mon, 22 Aug 2022 17:16:06 +0000 (+0200) Subject: files: don't set NOSTORE in 'store all' case X-Git-Tag: suricata-7.0.0-beta1~139 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1c22169f8efce1baecacbbb312c6d4f37443928;p=thirdparty%2Fsuricata.git files: don't set NOSTORE in 'store all' case --- 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; + } } } }