From: Lokesh Bevinamarad (lbevinam) Date: Tue, 17 Nov 2020 14:47:42 +0000 (+0000) Subject: Merge pull request #2596 in SNORT/snort3 from ~VKAMBALA/snort3:vkambala to master X-Git-Tag: 3.0.3-6~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3bc8a84ae2ee3b6e8643215dbc8212624ddff8b;p=thirdparty%2Fsnort3.git Merge pull request #2596 in SNORT/snort3 from ~VKAMBALA/snort3:vkambala to master Squashed commit of the following: commit 51d44ef769bddb1616445b20425a069a090cdf01 Author: krishnakanth Date: Wed Nov 4 02:19:18 2020 -0500 file_api: handling resume block when multiple file rules are configured with store option enabled --- diff --git a/src/file_api/file_flows.cc b/src/file_api/file_flows.cc index 7f697686b..03035494d 100644 --- a/src/file_api/file_flows.cc +++ b/src/file_api/file_flows.cc @@ -294,9 +294,9 @@ bool FileFlows::file_process(Packet* p, uint64_t file_id, const uint8_t* file_da context->set_file_id(file_id); } - if ( offset != 0 and context->is_cacheable() and - (FileService::get_file_cache()->cached_verdict_lookup(p, context, file_policy) != - FILE_VERDICT_UNKNOWN) ) + if ( ((offset != 0) or (position == SNORT_FILE_FULL)) and context->is_cacheable() and + (FileService::get_file_cache()->cached_verdict_lookup(p, context, file_policy) != + FILE_VERDICT_UNKNOWN) ) { context->processing_complete = true; remove_processed_file_context(multi_file_processing_id);