From: Jason Ish Date: Mon, 25 Sep 2017 08:40:02 +0000 (+0100) Subject: lua-output-http: make ports an int instead of a float X-Git-Tag: suricata-6.0.4~571 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbe95e11ca0d6f76405e78d3f28c46340b5479cf;p=thirdparty%2Fsuricata-verify.git lua-output-http: make ports an int instead of a float --- diff --git a/lua-output-http/expected/http_lua.log b/lua-output-http/expected/http_lua.log index 9a531a640..523f8b5f3 100644 --- a/lua-output-http/expected/http_lua.log +++ b/lua-output-http/expected/http_lua.log @@ -1 +1 @@ -10/06/2015-15:16:43.137833 codemonkey.net [**] /base64-hello-world.txt [**] curl/7.40.0 [**] 10.16.1.11:59733.0 -> 104.131.202.103:80.0 +10/06/2015-15:16:43.137833 codemonkey.net [**] /base64-hello-world.txt [**] curl/7.40.0 [**] 10.16.1.11:59733 -> 104.131.202.103:80 diff --git a/lua-output-http/http.lua b/lua-output-http/http.lua index 4b8cdb6a3..9d60f9139 100644 --- a/lua-output-http/http.lua +++ b/lua-output-http/http.lua @@ -37,8 +37,8 @@ function log(args) ipver, srcip, dstip, proto, sp, dp = SCFlowTuple() file:write (ts .. " " .. http_host .. " [**] " .. http_uri .. " [**] " .. - http_ua .. " [**] " .. srcip .. ":" .. sp .. " -> " .. - dstip .. ":" .. dp .. "\n") + http_ua .. " [**] " .. srcip .. ":" .. math.floor(sp) .. " -> " .. + dstip .. ":" .. math.floor(dp) .. "\n") file:flush() http = http + 1