hyperscan: better error message if not compiled

pull/5164/head
Shivani Bhardwaj 6 years ago committed by Victor Julien
parent ece29c4210
commit 537fb7a1c6

@ -643,6 +643,12 @@ uint16_t PatternMatchDefaultMatcher(void)
}
}
#ifndef BUILD_HYPERSCAN
if ((mpm_algo != NULL) && (strcmp(mpm_algo, "hs") == 0)) {
FatalError(SC_ERR_INVALID_VALUE, "Hyperscan (hs) support for mpm-algo is "
"not compiled into Suricata.");
}
#endif
SCLogError(SC_ERR_INVALID_YAML_CONF_ENTRY, "Invalid mpm algo supplied "
"in the yaml conf file: \"%s\"", mpm_algo);
exit(EXIT_FAILURE);

@ -83,6 +83,12 @@ uint16_t SinglePatternMatchDefaultMatcher(void)
}
}
#ifndef BUILD_HYPERSCAN
if ((spm_algo != NULL) && (strcmp(spm_algo, "hs") == 0)) {
FatalError(SC_ERR_INVALID_VALUE, "Hyperscan (hs) support for spm-algo is "
"not compiled into Suricata.");
}
#endif
SCLogError(SC_ERR_INVALID_YAML_CONF_ENTRY,
"Invalid spm algo supplied "
"in the yaml conf file: \"%s\"",

Loading…
Cancel
Save