]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #2596 in SNORT/snort3 from ~VKAMBALA/snort3:vkambala to master
authorLokesh Bevinamarad (lbevinam) <lbevinam@cisco.com>
Tue, 17 Nov 2020 14:47:42 +0000 (14:47 +0000)
committerLokesh Bevinamarad (lbevinam) <lbevinam@cisco.com>
Tue, 17 Nov 2020 14:47:42 +0000 (14:47 +0000)
Squashed commit of the following:

commit 51d44ef769bddb1616445b20425a069a090cdf01
Author: krishnakanth <vkambala@cisco.com>
Date:   Wed Nov 4 02:19:18 2020 -0500

    file_api: handling resume block when multiple file rules are configured with store option enabled

src/file_api/file_flows.cc

index 7f697686b27e9de203f5cd584312366fba094ca3..03035494dda4384c215df95dfbd97e02a6029244 100644 (file)
@@ -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);