]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #3785: file_api: handling file cache context
authorBhargava Jandhyala (bjandhya) <bjandhya@cisco.com>
Mon, 3 Apr 2023 05:43:40 +0000 (05:43 +0000)
committerBhargava Jandhyala (bjandhya) <bjandhya@cisco.com>
Mon, 3 Apr 2023 05:43:40 +0000 (05:43 +0000)
Merge in SNORT/snort3 from ~VKAMBALA/snort3:file_context_75 to master

Squashed commit of the following:

commit d2ef60bb3aadead55f22384cc5263882262f40d7
Author: krishnakanth <vkambala@cisco.com>
Date:   Tue Mar 21 18:47:29 2023 +0530

    file_api: handling file cache context

src/file_api/file_cache.cc

index 02d42d27731535fbab4fa2ff5bacdd1a0f5e75c3..41ae1d517e582db3f03723a4c1c40e0b07a0d0e3 100644 (file)
@@ -443,6 +443,11 @@ bool FileCache::apply_verdict(Packet* p, FileContext* file_ctx, FileVerdict verd
             act->set_delayed_action(Active::ACT_RETRY, true);
             FILE_DEBUG(file_trace, DEFAULT_TRACE_OPTION_ID, TRACE_DEBUG_LEVEL, p,
                 "apply_verdict:FILE_VERDICT_PENDING with action retry\n");
+            FileFlows *files = FileFlows::get_file_flows(flow);
+            if (files)
+            {
+               files->add_pending_file(file_ctx->get_file_id());
+            }
 
             if (resume)
                 policy->log_file_action(flow, file_ctx, FILE_RESUME_BLOCK);