From: Nicolas Thill Date: Fri, 5 Feb 2016 10:11:13 +0000 (+0100) Subject: lua: set thread vars in DetectLuaMatch X-Git-Tag: suricata-3.0.1RC1~160 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c9538b783e1f3f0765b75a93e0c8a5949697edb;p=thirdparty%2Fsuricata.git lua: set thread vars in DetectLuaMatch Fix internal error when calling SCThreadInfo from Lua detection modules. Signed-off-by: Nicolas Thill --- diff --git a/src/detect-lua.c b/src/detect-lua.c index a3eead4a9e..c4a49bdda7 100644 --- a/src/detect-lua.c +++ b/src/detect-lua.c @@ -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);