From: Russ Combs (rucombs) Date: Thu, 20 Dec 2018 16:12:29 +0000 (-0500) Subject: Merge pull request #1469 in SNORT/snort3 from ~DDAHIPHA/snort3:flow_for_first_packet... X-Git-Tag: 3.0.0-251~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a416f115cef2b43174b9dc82ce2d81bc0065141;p=thirdparty%2Fsnort3.git Merge pull request #1469 in SNORT/snort3 from ~DDAHIPHA/snort3:flow_for_first_packet to master Squashed commit of the following: commit a1cbb6c73750dd9b9f3225fae17d4c34018a1fdf Author: Devendra Dahiphale 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 --- diff --git a/src/main/snort_config.h b/src/main/snort_config.h index 20c704dca..b3de65322 100644 --- a/src/main/snort_config.h +++ b/src/main/snort_config.h @@ -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); diff --git a/src/stream/tcp/tcp_module.cc b/src/stream/tcp/tcp_module.cc index 39dd982cb..5019a50ca 100644 --- a/src/stream/tcp/tcp_module.cc +++ b/src/stream/tcp/tcp_module.cc @@ -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; }