]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #3029 in SNORT/snort3 from ~KATHARVE/snort3:norm_config_fix to...
authorTom Peters (thopeter) <thopeter@cisco.com>
Tue, 24 Aug 2021 17:52:30 +0000 (17:52 +0000)
committerTom Peters (thopeter) <thopeter@cisco.com>
Tue, 24 Aug 2021 17:52:30 +0000 (17:52 +0000)
Squashed commit of the following:

commit 72bc20166071cdb6b4b19e97ad1f048793f61887
Author: Katura Harvey <katharve@cisco.com>
Date:   Thu Aug 12 17:11:44 2021 -0400

    normalize: remove tcp.trim config

src/network_inspectors/normalize/norm_module.cc
tools/snort2lua/preprocessor_states/pps_normalizers.cc

index 0d2cca8d433f69ca322131852a6c0dba9852bb1a..c4ef1a67238161bd9e33aaf0432ae7c157256383 100644 (file)
@@ -137,9 +137,6 @@ static const Parameter norm_tcp_params[] =
     { "trim_mss", Parameter::PT_BOOL, nullptr, "false",
       "trim data to MSS" },
 
-    { "trim", Parameter::PT_BOOL, nullptr, "false",
-      "enable all of the TCP trim options" },
-
     { "opts", Parameter::PT_BOOL, nullptr, "false",
       "clear all options except mss, wscale, timestamp, and any explicitly allowed" },
 
@@ -284,13 +281,6 @@ bool NormalizeModule::set_tcp(const char*, const Value& v, SnortConfig*)
     else if ( v.is("trim_mss") )
         Norm_Set(&config, NORM_TCP_TRIM_MSS, v.get_bool());
 
-    else if ( v.is("trim") )
-    {
-        Norm_Set(&config, NORM_TCP_TRIM_SYN, v.get_bool());
-        Norm_Set(&config, NORM_TCP_TRIM_RST, v.get_bool());
-        Norm_Set(&config, NORM_TCP_TRIM_WIN, v.get_bool());
-        Norm_Set(&config, NORM_TCP_TRIM_MSS, v.get_bool());
-    }
     else if ( v.is("ecn") )
     {
         if ( !strcmp(v.get_string(), "packet") )
index 7cea27106c072d224dd6a1a679884c7f74556936..d7628ac6666575cad8d50463171ef501bdfb1d67 100644 (file)
@@ -169,7 +169,7 @@ bool TcpNormalizer::convert(std::istringstream& data_stream)
             table_api.add_option("ips", true);
 
         else if (keyword == "trim")
-            table_api.add_option("trim", true);
+            table_api.add_deleted_comment(keyword);
 
         else if (keyword == "opts")
             table_api.add_option("opts", true);