]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #1469 in SNORT/snort3 from ~DDAHIPHA/snort3:flow_for_first_packet...
authorRuss Combs (rucombs) <rucombs@cisco.com>
Thu, 20 Dec 2018 16:12:29 +0000 (11:12 -0500)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Thu, 20 Dec 2018 16:12:29 +0000 (11:12 -0500)
Squashed commit of the following:

commit a1cbb6c73750dd9b9f3225fae17d4c34018a1fdf
Author: Devendra Dahiphale <ddahipha@cisco.com>
Date:   Fri Dec 14 18:31:19 2018 -0500

    snort_config: Add a setter for setting run_flags and set it to TRACK_ON_SYN for hs_timeout config

src/main/snort_config.h
src/stream/tcp/tcp_module.cc

index 20c704dca0e937f27f6bf818c9d2b38325347df1..b3de653224845729d774f44c738ed5ec1e359d38 100644 (file)
@@ -647,6 +647,9 @@ public:
     bool track_on_syn() const
     { return (run_flags & RUN_FLAG__TRACK_ON_SYN) != 0; }
 
+    void set_run_flags(RunFlag flag)
+    { run_flags |= flag; }
+
     // This requests an entry in the scratch space vector and calls setup /
     // cleanup as appropriate
     SO_PUBLIC static int request_scratch(ScScratchFunc setup, ScScratchFunc cleanup);
index 39dd982cb18006f2f678b2ad28d057aaaae0e10a..5019a50ca1812d4b3a10c3f844d81711d8e6e1c5 100644 (file)
@@ -355,7 +355,7 @@ bool StreamTcpModule::begin(const char* fqn, int, SnortConfig*)
 bool StreamTcpModule::end(const char*, int, SnortConfig* sc)
 {
     if ( config->hs_timeout >= 0 )
-        sc->run_flags |= RUN_FLAG__TRACK_ON_SYN;
+        sc->set_run_flags(RUN_FLAG__TRACK_ON_SYN);
     return true;
 }