From: Victor Julien Date: Tue, 14 Jun 2016 12:08:34 +0000 (+0200) Subject: cuda: make sure we don't use cuda in proto detect X-Git-Tag: suricata-3.1.1~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c59d60049aa7f9a6624d77870558ceed9b8df4e;p=thirdparty%2Fsuricata.git cuda: make sure we don't use cuda in proto detect --- diff --git a/src/app-layer-detect-proto.c b/src/app-layer-detect-proto.c index fb25b5b352..541fa24e90 100644 --- a/src/app-layer-detect-proto.c +++ b/src/app-layer-detect-proto.c @@ -1530,6 +1530,12 @@ int AppLayerProtoDetectSetup(void) uint16_t spm_matcher = SinglePatternMatchDefaultMatcher(); uint16_t mpm_matcher = PatternMatchDefaultMatcher(); +#ifdef __SC_CUDA_SUPPORT__ + /* CUDA won't work here, so fall back to AC */ + if (mpm_matcher == MPM_AC_CUDA) + mpm_matcher = DEFAULT_MPM; +#endif + alpd_ctx.spm_global_thread_ctx = SpmInitGlobalThreadCtx(spm_matcher); if (alpd_ctx.spm_global_thread_ctx == NULL) { SCLogError(SC_ERR_FATAL, "Unable to alloc SpmGlobalThreadCtx.");