diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-18 13:11:22 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-18 13:11:22 +0000 |
commit | 8f03e5ef523da05a7080e8e5f2617af5162ccab4 (patch) | |
tree | 9851ea05276df25fa5afb75e75ccd626723f9c23 /lualib | |
parent | 7f482c08cef8b8e7817d2154ee46aa2569f28e30 (diff) | |
download | rspamd-8f03e5ef523da05a7080e8e5f2617af5162ccab4.tar.gz rspamd-8f03e5ef523da05a7080e8e5f2617af5162ccab4.zip |
[Minor] P0f: More output fixes
Diffstat (limited to 'lualib')
-rw-r--r-- | lualib/lua_scanners/p0f.lua | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lualib/lua_scanners/p0f.lua b/lualib/lua_scanners/p0f.lua index 0e7bd4279..06953660d 100644 --- a/lualib/lua_scanners/p0f.lua +++ b/lualib/lua_scanners/p0f.lua @@ -100,11 +100,17 @@ local function p0f_check(task, ip, rule) uptime_min, distance) if link_type and #link_type > 0 then - common.yield_result(task, rule, string.format('%s, link=%s, distance: %s', - os_string, link_type, distance), 0.0) + common.yield_result(task, rule, { + os_string, + 'link=' .. link_type, + 'distance=' .. distance}, + 0.0) else - common.yield_result(task, rule, string.format('%s, distance: %s', - os_string, distance), 0.0) + common.yield_result(task, rule, { + os_string, + 'link=unknown', + 'distance=' .. distance}, + 0.0) end return data @@ -122,6 +128,8 @@ local function p0f_check(task, ip, rule) if err then rspamd_logger.errx(task, 'p0f received an error: %s', err) + common.yield_result(task, rule, 'Error getting result: ' .. err, + 0.0, 'fail') return end |