From: Bhargava Jandhyala (bjandhya) Date: Tue, 20 Jul 2021 08:00:50 +0000 (+0000) Subject: Merge pull request #2984 in SNORT/snort3 from ~VKAMBALA/snort3:offset_fix to master X-Git-Tag: 3.1.9.0~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ccd044c10f54e8781b495e393041a3f396d3d5d0;p=thirdparty%2Fsnort3.git Merge pull request #2984 in SNORT/snort3 from ~VKAMBALA/snort3:offset_fix to master Squashed commit of the following: commit 8f90cc5f5fff118034b5f55065b0e3ec4b0ce31e Author: krishnakanth Date: Fri Jul 16 06:39:49 2021 -0400 file_api: Handling file_cache inspection for non zero offset --- diff --git a/src/file_api/file_flows.cc b/src/file_api/file_flows.cc index 33e432e42..12fddd499 100644 --- a/src/file_api/file_flows.cc +++ b/src/file_api/file_flows.cc @@ -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) ) {