]> source.dussan.org Git - rspamd.git/commitdiff
Fix plugins.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 29 Mar 2014 23:09:36 +0000 (16:09 -0700)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 3 Apr 2014 10:40:30 +0000 (11:40 +0100)
src/plugins/lua/ip_score.lua
src/plugins/lua/multimap.lua
src/plugins/lua/whitelist.lua

index 374714bc596045780c9b012126b058172deaa1ed..ab8258a89ff7eb31df991c0c3137f1172a118e7f 100644 (file)
@@ -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
index 1711c212ec702c5bb80947a241f9fa5127a7799a..4ad8766f567e1b31df07d1e11919e41112984cfb 100644 (file)
@@ -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
index 5b8fe4fcba979d54cf5b8028f7b0d537d54c33ba..84adada72cba6883dd7a94839c2ab30c1dd4540f 100644 (file)
@@ -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