]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #1508 in SNORT/snort3 from ~MIREDDEN/snort3:convert_file_config...
authorTom Peters (thopeter) <thopeter@cisco.com>
Mon, 11 Feb 2019 15:45:23 +0000 (10:45 -0500)
committerTom Peters (thopeter) <thopeter@cisco.com>
Mon, 11 Feb 2019 15:45:23 +0000 (10:45 -0500)
Squashed commit of the following:

commit 58cdd89496b6038ba3aae3e3805b237f5eb7b782
Author: Mike Redden <miredden@cisco.com>
Date:   Thu Feb 7 16:23:16 2019 -0500

    snort2lua: convert file_capture config options

tools/snort2lua/config_states/config_file.cc

index 4ecff3c64aa8b4db5c89e2cde8add0b0b161cf70..5e6d9286d1743c616fb2664fe84abff047144d75 100644 (file)
@@ -51,19 +51,28 @@ bool File::convert(std::istringstream& data_stream)
         if (!(arg_stream >> keyword))
             tmpval = false;
 
-        // vvvvvvvv -- UNSUPPORTED OPTIONS.  these options were added after 2.9.6
         else if (keyword == "file_capture_memcap")
-            table_api.add_unsupported_comment("file_capture_memcap");
-
+        {
+            table_api.add_diff_option_comment("config file: file_capture_memcap", "capture_memcap");
+            tmpval = parse_int_option("capture_memcap", arg_stream, false);
+        }
         else if (keyword == "file_capture_max")
-            table_api.add_unsupported_comment("file_capture_max");
+        {
+            table_api.add_diff_option_comment("config file: file_capture_max", "capture_max_size");
+            tmpval = parse_int_option("capture_max_size", arg_stream, false);
+        }
 
         else if (keyword == "file_capture_min")
-            table_api.add_unsupported_comment("file_capture_min");
+        {
+            table_api.add_diff_option_comment("config file: file_capture_min", "capture_min_size");
+            tmpval = parse_int_option("capture_min_size", arg_stream, false);
+        }
 
         else if (keyword == "file_capture_block_size")
-            table_api.add_unsupported_comment("file_capture_block_size");
-        // ^^^^^^^^^ -- UNSUPPORTED OPTIONS.  these options were added after 2.9.6
+        {
+            table_api.add_diff_option_comment("config file: file_capture_block_size", "capture_block_size");
+            tmpval = parse_int_option("capture_block_size", arg_stream, false);
+        }
 
         else if (keyword == "show_data_depth")
             tmpval = parse_int_option("show_data_depth", arg_stream, false);