]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #4608: file_api: file event generated for asymmetric flow
authorShilpa Nagpal (shinagpa) <shinagpa@cisco.com>
Thu, 13 Feb 2025 10:15:20 +0000 (10:15 +0000)
committerLokesh Bevinamarad (lbevinam) <lbevinam@cisco.com>
Thu, 13 Feb 2025 10:15:20 +0000 (10:15 +0000)
Merge in SNORT/snort3 from ~SHINAGPA/snort3:file_event_asymmetric to master

Squashed commit of the following:

commit 4c31d728b366af41c1bd8cb2cbb401cdbc20ba79
Author: Shilpa Nagpal <shinagpa@cisco.com>
Date:   Fri Feb 7 18:14:50 2025 +0530

    file_api: file event generated for asymmetric flow

src/file_api/file_lib.cc

index b5973f1c2d7bfc478878964542e3be291069bbc3..c95503996ca481fa79f1c57bf0f2ec99058fc5f4 100644 (file)
@@ -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;