From: Maya Dagon (mdagon) Date: Fri, 25 Aug 2023 12:30:01 +0000 (+0000) Subject: Pull request #3971: http2_inspect: test tool config changes X-Git-Tag: 3.1.69.0~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38a71d541a70c170b5be7e84a1272328585ebe0c;p=thirdparty%2Fsnort3.git Pull request #3971: http2_inspect: test tool config changes Merge in SNORT/snort3 from ~MDAGON/snort3:fix_test to master Squashed commit of the following: commit 17143f2739a892c03d085a7451e4518a11fc6c16 Author: maya dagon Date: Mon Aug 21 09:29:42 2023 -0400 http2_inspect: update test tool configurations --- diff --git a/src/service_inspectors/http2_inspect/http2_inspect.cc b/src/service_inspectors/http2_inspect/http2_inspect.cc index 9931a2d65..01443ce1e 100644 --- a/src/service_inspectors/http2_inspect/http2_inspect.cc +++ b/src/service_inspectors/http2_inspect/http2_inspect.cc @@ -53,13 +53,6 @@ Http2Inspect::Http2Inspect(const Http2ParaList* params_) : params(params_) { HttpTestManager::activate_test_output(HttpTestManager::IN_HTTP2); } - if ((params->test_input) || (params->test_output)) - { - HttpTestManager::set_print_amount(params->print_amount); - HttpTestManager::set_print_hex(params->print_hex); - HttpTestManager::set_show_pegs(params->show_pegs); - HttpTestManager::set_show_scan(params->show_scan); - } #endif } diff --git a/src/service_inspectors/http2_inspect/http2_module.cc b/src/service_inspectors/http2_inspect/http2_module.cc index 8e5cebf73..cd8ed6f07 100644 --- a/src/service_inspectors/http2_inspect/http2_module.cc +++ b/src/service_inspectors/http2_inspect/http2_module.cc @@ -36,18 +36,6 @@ const Parameter Http2Module::http2_params[] = { "test_output", Parameter::PT_BOOL, nullptr, "false", "print out HTTP section data" }, - - { "print_amount", Parameter::PT_INT, "1:max53", "1200", - "number of characters to print from a Field" }, - - { "print_hex", Parameter::PT_BOOL, nullptr, "false", - "nonprinting characters printed in [HH] format instead of using an asterisk" }, - - { "show_pegs", Parameter::PT_BOOL, nullptr, "true", - "display peg counts with test output" }, - - { "show_scan", Parameter::PT_BOOL, nullptr, "false", - "display scanned segments" }, #endif { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr } @@ -82,22 +70,6 @@ bool Http2Module::set(const char*, Value& val, SnortConfig*) { params->test_output = val.get_bool(); } - else if (val.is("print_amount")) - { - params->print_amount = val.get_int64(); - } - else if (val.is("print_hex")) - { - params->print_hex = val.get_bool(); - } - else if (val.is("show_pegs")) - { - params->show_pegs = val.get_bool(); - } - else if (val.is("show_scan")) - { - params->show_scan = val.get_bool(); - } #endif return true; } diff --git a/src/service_inspectors/http2_inspect/http2_module.h b/src/service_inspectors/http2_inspect/http2_module.h index 4d63e2681..c0f7bb62e 100644 --- a/src/service_inspectors/http2_inspect/http2_module.h +++ b/src/service_inspectors/http2_inspect/http2_module.h @@ -36,13 +36,9 @@ struct Http2ParaList public: uint32_t concurrent_streams_limit; #ifdef REG_TEST - int64_t print_amount; bool test_input; bool test_output; - bool print_hex; - bool show_pegs; - bool show_scan; #endif }; diff --git a/src/service_inspectors/http_inspect/http_inspect.cc b/src/service_inspectors/http_inspect/http_inspect.cc index 4517a39e9..56262fc3a 100755 --- a/src/service_inspectors/http_inspect/http_inspect.cc +++ b/src/service_inspectors/http_inspect/http_inspect.cc @@ -117,13 +117,12 @@ HttpInspect::HttpInspect(const HttpParaList* params_) : { HttpTestManager::activate_test_output(HttpTestManager::IN_HTTP); } - if ((params->test_input) || (params->test_output)) - { - HttpTestManager::set_print_amount(params->print_amount); - HttpTestManager::set_print_hex(params->print_hex); - HttpTestManager::set_show_pegs(params->show_pegs); - HttpTestManager::set_show_scan(params->show_scan); - } + + HttpTestManager::set_print_amount(params->print_amount); + HttpTestManager::set_print_hex(params->print_hex); + HttpTestManager::set_show_pegs(params->show_pegs); + HttpTestManager::set_show_scan(params->show_scan); + #endif if (params->script_detection)