From: Shilpa Nagpal (shinagpa) Date: Thu, 13 Feb 2025 10:15:20 +0000 (+0000) Subject: Pull request #4608: file_api: file event generated for asymmetric flow X-Git-Tag: 3.7.1.0~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3956dd88c4ad8363a3182a2df3b46244be7a9bd;p=thirdparty%2Fsnort3.git Pull request #4608: file_api: file event generated for asymmetric flow Merge in SNORT/snort3 from ~SHINAGPA/snort3:file_event_asymmetric to master Squashed commit of the following: commit 4c31d728b366af41c1bd8cb2cbb401cdbc20ba79 Author: Shilpa Nagpal Date: Fri Feb 7 18:14:50 2025 +0530 file_api: file event generated for asymmetric flow --- diff --git a/src/file_api/file_lib.cc b/src/file_api/file_lib.cc index b5973f1c2..c95503996 100644 --- a/src/file_api/file_lib.cc +++ b/src/file_api/file_lib.cc @@ -403,8 +403,8 @@ inline void FileContext::finalize_file_type() void FileContext::log_file_event(Flow* flow, FilePolicyBase* policy) { - // wait for file name is set to log file event - if ( is_file_name_set() ) + // log file event either when filename is set or if it is a asymmetric flow + if ( is_file_name_set() or !flow->two_way_traffic() ) { bool log_needed = true;