]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
util/lua-common: use pushinteger w/ byte & pkt cnt
authorJuliana Fajardini <jufajardini@gmail.com>
Tue, 7 Sep 2021 09:37:19 +0000 (10:37 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 27 Sep 2021 09:53:10 +0000 (11:53 +0200)
LuaCallbackStatsPushToStackFromFlow tuple is composed of integer values
not all of them had been converted to lua_pushinteger yet.

(cherry picked from commit 8b53468d32e5b14817a41c6b0656cd3569a87749)

src/util-lua-common.c

index b1ee53a061067e80b21816cad3497e0769ab9c37..22da8d3fd90d1aeb3d93d543ccc6d2e671d259a5 100644 (file)
@@ -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;
 }