diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-04-03 12:43:14 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-04-03 12:43:14 +0100 |
commit | 490f4f89875e468ef7bed54a005eacb7822287df (patch) | |
tree | f5894e5c29800baafee438941b848a8728c8e8cf | |
parent | 3d3ca37ed64f38ae53261f17aa683b6c0c459ffe (diff) | |
download | rspamd-490f4f89875e468ef7bed54a005eacb7822287df.tar.gz rspamd-490f4f89875e468ef7bed54a005eacb7822287df.zip |
Fix misusage of ip object.
-rw-r--r-- | src/plugins/lua/multimap.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua index 8b094aa80..aac0f5159 100644 --- a/src/plugins/lua/multimap.lua +++ b/src/plugins/lua/multimap.lua @@ -24,12 +24,12 @@ local function check_multimap(task) if rule['type'] == 'ip' then if rule['cdb'] then local ip = task:get_from_ip() - if ip:is_valid() and rule['hash']:lookup(ip) then + if ip:is_valid() and rule['hash']:lookup(ip:to_string()) then task:insert_result(rule['symbol'], 1) end else - local ip = task:get_from_ip():to_number() - if ip:is_valid() and rule['ips'] and rule['ips']:get_key(ip) then + local ip = task:get_from_ip() + if ip:is_valid() and rule['ips'] and rule['ips']:get_key(ip:to_number()) then task:insert_result(rule['symbol'], 1) end end |