From: George Koikara (gkoikara) Date: Wed, 1 Apr 2020 14:51:41 +0000 (+0000) Subject: Merge pull request #2103 in SNORT/snort3 from ~NEHASH4/snort3:CSCvt32429 to master X-Git-Tag: 3.0.1-2~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c7f1a3ea2c4c1b6da754698a7d8472b201ab7f7;p=thirdparty%2Fsnort3.git Merge pull request #2103 in SNORT/snort3 from ~NEHASH4/snort3:CSCvt32429 to master Squashed commit of the following: commit fc824674b7f4d878f4dfa7ed54bb4702f6a1aae5 Author: neha sharma Date: Sun Mar 22 05:05:20 2020 -0400 file: apply cached verdict on already seen file --- diff --git a/src/file_api/file_flows.cc b/src/file_api/file_flows.cc index b1d60e8fa..97687a216 100644 --- a/src/file_api/file_flows.cc +++ b/src/file_api/file_flows.cc @@ -277,6 +277,15 @@ 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 + (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); + return false; + } + if (context->processing_complete and context->verdict != FILE_VERDICT_UNKNOWN) { /*A new file session, but policy might be different*/