]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #2984 in SNORT/snort3 from ~VKAMBALA/snort3:offset_fix to master
authorBhargava Jandhyala (bjandhya) <bjandhya@cisco.com>
Tue, 20 Jul 2021 08:00:50 +0000 (08:00 +0000)
committerBhargava Jandhyala (bjandhya) <bjandhya@cisco.com>
Tue, 20 Jul 2021 08:00:50 +0000 (08:00 +0000)
Squashed commit of the following:

commit 8f90cc5f5fff118034b5f55065b0e3ec4b0ce31e
Author: krishnakanth <vkambala@cisco.com>
Date:   Fri Jul 16 06:39:49 2021 -0400

    file_api: Handling file_cache inspection for non zero offset

src/file_api/file_flows.cc

index 33e432e420e33476b5dc40350722cab1d571cbbb..12fddd49935f18670f8cce7b373edde59a354f35 100644 (file)
@@ -321,7 +321,7 @@ bool FileFlows::file_process(Packet* p, uint64_t file_id, const uint8_t* file_da
         context->set_file_id(file_id);
     }
 
-    if ( ((offset != 0) or (position == SNORT_FILE_FULL)) and context->is_cacheable() and
+    if ( context->is_cacheable() and
             (FileService::get_file_cache()->cached_verdict_lookup(p, context, file_policy) !=
         FILE_VERDICT_UNKNOWN) )
     {