From: Juliana Fajardini Date: Tue, 7 Sep 2021 09:37:19 +0000 (+0100) Subject: util/lua-common: use pushinteger w/ byte & pkt cnt X-Git-Tag: suricata-5.0.8~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9440cc3c47b7d6cc29c7290a88bc78a223502746;p=thirdparty%2Fsuricata.git util/lua-common: use pushinteger w/ byte & pkt cnt LuaCallbackStatsPushToStackFromFlow tuple is composed of integer values not all of them had been converted to lua_pushinteger yet. (cherry picked from commit 8b53468d32e5b14817a41c6b0656cd3569a87749) --- diff --git a/src/util-lua-common.c b/src/util-lua-common.c index b1ee53a061..22da8d3fd9 100644 --- a/src/util-lua-common.c +++ b/src/util-lua-common.c @@ -494,9 +494,9 @@ static int LuaCallbackAppLayerProtoFlow(lua_State *luastate) static int LuaCallbackStatsPushToStackFromFlow(lua_State *luastate, const Flow *f) { lua_pushinteger(luastate, f->todstpktcnt); - lua_pushnumber(luastate, f->todstbytecnt); + lua_pushinteger(luastate, f->todstbytecnt); lua_pushinteger(luastate, f->tosrcpktcnt); - lua_pushnumber(luastate, f->tosrcbytecnt); + lua_pushinteger(luastate, f->tosrcbytecnt); return 4; }