diff --git a/src/suricata.c b/src/suricata.c index f105d01cba..16d648ece6 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -233,6 +233,10 @@ int g_disable_randomness = 1; * comparing flows */ uint16_t g_vlan_mask = 0xffff; +/* flag to disable hashing almost globally, to be similar to disabling nss + * support */ +bool g_disable_hashing = false; + /** Suricata instance */ SCInstance suricata; @@ -1225,6 +1229,7 @@ static TmEcode ParseCommandLine(int argc, char** argv, SCInstance *suri) {"pidfile", required_argument, 0, 0}, {"init-errors-fatal", 0, 0, 0}, {"disable-detection", 0, 0, 0}, + {"disable-hashing", 0, 0, 0}, {"fatal-unittests", 0, 0, 0}, {"unittests-coverage", 0, &coverage_unittests, 1}, {"user", required_argument, 0, 0}, @@ -1427,8 +1432,9 @@ static TmEcode ParseCommandLine(int argc, char** argv, SCInstance *suri) } else if(strcmp((long_opts[option_index]).name, "disable-detection") == 0) { g_detect_disabled = suri->disabled_detect = 1; - } - else if(strcmp((long_opts[option_index]).name, "fatal-unittests") == 0) { + } else if (strcmp((long_opts[option_index]).name, "disable-hashing") == 0) { + g_disable_hashing = true; + } else if (strcmp((long_opts[option_index]).name, "fatal-unittests") == 0) { #ifdef UNITTESTS unittests_fatal = 1; #else diff --git a/src/suricata.h b/src/suricata.h index 43bb8ab0c5..236c0883eb 100644 --- a/src/suricata.h +++ b/src/suricata.h @@ -171,6 +171,9 @@ extern volatile uint8_t suricata_ctl_flags; extern int g_disable_randomness; extern uint16_t g_vlan_mask; +/* Flag to disable hashing (almost) globally. */ +extern bool g_disable_hashing; + #include #define u8_tolower(c) tolower((uint8_t)(c)) #define u8_toupper(c) toupper((uint8_t)(c))