]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Snort2Lua: create tcp/ipv4 tables if no arguments provided
authorJosh <jrosenba@cisco.com>
Wed, 29 Oct 2014 22:38:22 +0000 (15:38 -0700)
committerJosh <jrosenba@cisco.com>
Wed, 29 Oct 2014 22:38:22 +0000 (15:38 -0700)
tools/snort2lua/preprocessor_states/pps_normalizers.cc

index 15b817d6975ee3b84c765e6f8f426310c94895f3..a87210dcfba3346b77383717f4b565a7e777e5fc 100644 (file)
@@ -105,7 +105,6 @@ bool Ip4Normalizer::convert(std::istringstream& data_stream)
 
     table_api.open_table("normalizer");
     table_api.open_table("ip4");
-    table_api.add_option("base", true);
 
     while (util::get_string(data_stream, keyword, " ,"))
     {
@@ -139,6 +138,9 @@ bool Ip4Normalizer::convert(std::istringstream& data_stream)
 
 static ConversionState* ip4_ctor(Converter& c)
 {
+    c.get_table_api().open_table("normalizer");
+    table_api.open_table("ip4");
+    c.get_table_api().close_table();
     return new Ip4Normalizer(c);
 }
 
@@ -175,7 +177,6 @@ bool TcpNormalizer::convert(std::istringstream& data_stream)
 
     table_api.open_table("normalizer");
     table_api.open_table("tcp");
-    table_api.add_option("base", true);
 
     while (util::get_string(data_stream, keyword, " ,"))
     {
@@ -313,6 +314,9 @@ bool TcpNormalizer::convert(std::istringstream& data_stream)
 
 static ConversionState* tcp_ctor(Converter& c)
 {
+    c.get_table_api().open_table("normalizer");
+    table_api.open_table("tcp");
+    c.get_table_api().close_table();
     return new TcpNormalizer(c);
 }