From: Tom Peters (thopeter) Date: Mon, 6 May 2019 21:01:49 +0000 (-0400) Subject: Merge pull request #1599 in SNORT/snort3 from ~KATHARVE/snort3:uniformity_rule_state... X-Git-Tag: 3.0.0-256~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81df4d337f6da644880313c93219e70a0fdd1db3;p=thirdparty%2Fsnort3.git Merge pull request #1599 in SNORT/snort3 from ~KATHARVE/snort3:uniformity_rule_state to master Squashed commit of the following: commit b5dbbf67ffbef7a7f0afcf0fa68083339bea3c2b Author: Katura Harvey Date: Wed May 1 09:52:43 2019 -0400 Uniformity: Update the rule_state value to yes or no --- diff --git a/src/main/modules.cc b/src/main/modules.cc index 520f2d557..3abaa0886 100644 --- a/src/main/modules.cc +++ b/src/main/modules.cc @@ -1218,7 +1218,7 @@ bool InspectionModule::set(const char*, Value& v, SnortConfig* sc) static const Parameter ips_params[] = { - { "default_rule_state", Parameter::PT_ENUM, "false | true | inherit", "inherit", + { "default_rule_state", Parameter::PT_ENUM, "no | yes | inherit", "inherit", "enable or disable ips rules" }, { "enable_builtin_rules", Parameter::PT_BOOL, nullptr, "false", @@ -1737,7 +1737,7 @@ static const Parameter single_rule_state_params[] = "log | pass | alert | drop | block | reset | inherit", "inherit", "apply action if rule matches or inherit from rule definition" }, - { "enable", Parameter::PT_ENUM, "false | true | inherit", "inherit", + { "enable", Parameter::PT_ENUM, "no | yes | inherit", "inherit", "enable or disable rule in current ips policy or use default defined by ips policy" }, { nullptr, Parameter::PT_MAX, nullptr, nullptr, nullptr } diff --git a/tools/snort2lua/keyword_states/kws_rule_state.cc b/tools/snort2lua/keyword_states/kws_rule_state.cc index 6519fa1c3..6ffadb613 100644 --- a/tools/snort2lua/keyword_states/kws_rule_state.cc +++ b/tools/snort2lua/keyword_states/kws_rule_state.cc @@ -75,9 +75,9 @@ bool RuleState::convert(std::istringstream& data_stream) break; case 2: if (arg == "enabled") - enable = "true"; + enable = "yes"; else if (arg == "disabled") - enable = "false"; + enable = "no"; else { data_api.failed_conversion(data_stream, "third option must be {enabled|disabled|");