summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-03-29 16:09:36 -0700
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-03-29 16:09:36 -0700
commitf373b6b12a7baf68543b831313cbe4ec7c38063e (patch)
treedc590ce5dc42e480acfa52db6bc4f78559152c2a /src
parenteb68f30ca2261fba8388c9774b117c6213eaa4ba (diff)
downloadrspamd-f373b6b12a7baf68543b831313cbe4ec7c38063e.tar.gz
rspamd-f373b6b12a7baf68543b831313cbe4ec7c38063e.zip
Fix plugins.
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/ip_score.lua4
-rw-r--r--src/plugins/lua/multimap.lua2
-rw-r--r--src/plugins/lua/whitelist.lua2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/lua/ip_score.lua b/src/plugins/lua/ip_score.lua
index 374714bc5..ab8258a89 100644
--- a/src/plugins/lua/ip_score.lua
+++ b/src/plugins/lua/ip_score.lua
@@ -40,7 +40,7 @@ local ip_score_set = function(task)
if action then
-- Check whitelist
if whitelist then
- local ipnum = task:get_from_ip_num()
+ local ipnum = task:get_from_ip():to_number()
if ipnum and whitelist:get_key(ipnum) then
-- Address is whitelisted
return
@@ -103,7 +103,7 @@ local ip_score_check = function(task)
local ip = task:get_from_ip()
if ip then
if whitelist then
- local ipnum = task:get_from_ip_num()
+ local ipnum = task:get_from_ip():to_number()
if whitelist:get_key(ipnum) then
-- Address is whitelisted
return
diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua
index 1711c212e..4ad8766f5 100644
--- a/src/plugins/lua/multimap.lua
+++ b/src/plugins/lua/multimap.lua
@@ -28,7 +28,7 @@ local function check_multimap(task)
task:insert_result(rule['symbol'], 1)
end
else
- local ip = task:get_from_ip_num()
+ local ip = task:get_from_ip():to_number()
if ip and rule['ips'] and rule['ips']:get_key(ip) then
task:insert_result(rule['symbol'], 1)
end
diff --git a/src/plugins/lua/whitelist.lua b/src/plugins/lua/whitelist.lua
index 5b8fe4fcb..84adada72 100644
--- a/src/plugins/lua/whitelist.lua
+++ b/src/plugins/lua/whitelist.lua
@@ -9,7 +9,7 @@ local h = nil -- radix tree and hash table
local function check_whitelist (task)
if symbol_ip then
-- check client's ip
- local ipn = task:get_from_ip_num()
+ local ipn = task:get_from_ip():to_number()
if ipn then
local key = r:get_key(ipn)
if key then