]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
lua: set thread vars in DetectLuaMatch
authorNicolas Thill <ntl@p1sec.com>
Fri, 5 Feb 2016 10:11:13 +0000 (11:11 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 9 Feb 2016 13:31:12 +0000 (14:31 +0100)
Fix internal error when calling SCThreadInfo from Lua detection modules.

Signed-off-by: Nicolas Thill <ntl@p1sec.com>
src/detect-lua.c

index a3eead4a9e12dc1e73a18ff23de2403bc30d9593..c4a49bdda7806eb23380ddef4a7ec19377d769e6 100644 (file)
@@ -418,6 +418,7 @@ static int DetectLuaMatch (ThreadVars *tv, DetectEngineThreadCtx *det_ctx,
     else if (p->flowflags & FLOW_PKT_TOCLIENT)
         flags = STREAM_TOCLIENT;
 
+    LuaStateSetThreadVars(tluajit->luastate, tv);
     LuaExtensionsMatchSetup(tluajit->luastate, luajit, det_ctx,
             p->flow, /* flow not locked */LUA_FLOW_NOT_LOCKED_BY_PARENT, p, flags);