From: Vsevolod Stakhov Date: Thu, 3 Apr 2014 11:43:14 +0000 (+0100) Subject: Fix misusage of ip object. X-Git-Tag: 0.6.10~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d9450192f52443303b72e9cbd5a9b9d0ac7807f;p=thirdparty%2Frspamd.git Fix misusage of ip object. --- diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua index 8b094aa809..aac0f51590 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