summaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/rbl.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-10-08 12:50:44 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-10-08 12:50:44 +0100
commit79900965e4537122d9702b21075b4eacbd9b7492 (patch)
treefbdce49c5a556802a5566208bb1c8eda41791947 /src/plugins/lua/rbl.lua
parent65ee3ec117e9b0d58d045f8ecd6bd505cc0e06e7 (diff)
downloadrspamd-79900965e4537122d9702b21075b4eacbd9b7492.tar.gz
rspamd-79900965e4537122d9702b21075b4eacbd9b7492.zip
[Fix] Fix options in rbl symbols
Diffstat (limited to 'src/plugins/lua/rbl.lua')
-rw-r--r--src/plugins/lua/rbl.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua
index a3a9ffb63..7016d9c5e 100644
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@ -308,14 +308,16 @@ local function gen_rbl_callback(rule)
local function add_dns_request(task, req, forced, is_ip, requests_table, what, whitelist)
local req_str = req
if is_ip then
- req_str = ip_to_rbl(req)
+ req_str = tostring(req)
end
if whitelist and is_whitelisted(task, req, req_str, whitelist, what) then
return
end
- req = req_str
+ if is_ip then
+ req = ip_to_rbl(req)
+ end
if requests_table[req] then
-- Duplicate request
@@ -331,7 +333,7 @@ local function gen_rbl_callback(rule)
local nreq = {
forced = forced,
n = processed,
- orig = req,
+ orig = req_str,
resolve_ip = resolve_ip,
what = what,
}
@@ -354,7 +356,7 @@ local function gen_rbl_callback(rule)
local nreq = {
forced = forced,
n = to_resolve,
- orig = orign,
+ orig = req_str,
resolve_ip = resolve_ip,
what = what,
}