ac-ks: don't allow use on big-endian

pull/2129/head
Victor Julien 9 years ago
parent 181f67ff97
commit 371113e21e

@ -335,6 +335,13 @@ uint16_t PatternMatchDefaultMatcher(void)
uint16_t u; uint16_t u;
if (mpm_algo != NULL) { if (mpm_algo != NULL) {
#if __BYTE_ORDER == __BIG_ENDIAN
if (strcmp(mpm_algo, "ac-ks") == 0) {
SCLogError(SC_ERR_INVALID_YAML_CONF_ENTRY, "ac-ks does "
"not work on big endian systems at this time.");
exit(EXIT_FAILURE);
}
#endif
if (strcmp("auto", mpm_algo) == 0) { if (strcmp("auto", mpm_algo) == 0) {
goto done; goto done;
} }

@ -68,6 +68,8 @@
#include "suricata-common.h" #include "suricata-common.h"
#include "suricata.h" #include "suricata.h"
#if __BYTE_ORDER == __LITTLE_ENDIAN
#include "detect.h" #include "detect.h"
#include "detect-parse.h" #include "detect-parse.h"
#include "detect-engine.h" #include "detect-engine.h"
@ -2569,3 +2571,11 @@ void SCACTileRegisterTests(void)
#endif #endif
} }
#else /* we're big endian */
void MpmACTileRegister(void)
{
/* no-op on big endian */
}
#endif /* little endian check */

Loading…
Cancel
Save