]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
cuda: make sure we don't use cuda in proto detect
authorVictor Julien <victor@inliniac.net>
Tue, 14 Jun 2016 12:08:34 +0000 (14:08 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 4 Jul 2016 16:22:31 +0000 (18:22 +0200)
src/app-layer-detect-proto.c

index fb25b5b352092680a144eb6216051d8134cd0a97..541fa24e900310499c22d442232b2deaa80bce99 100644 (file)
@@ -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.");