aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2012-04-20 20:27:55 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2012-04-20 20:27:55 +0400
commit8f48a65e3e7cad14d019b3f8930593bf2e4b3636 (patch)
tree665eb95982470dd4fa87fdb25884a9cc8cd13801 /src
parent4d4668a0d4022583208d20bac9b8a0bede6f073d (diff)
downloadrspamd-8f48a65e3e7cad14d019b3f8930593bf2e4b3636.tar.gz
rspamd-8f48a65e3e7cad14d019b3f8930593bf2e4b3636.zip
Fix multimap to handle ipv6 addresses.
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/multimap.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua
index 548cc2ea6..fe213b8e6 100644
--- a/src/plugins/lua/multimap.lua
+++ b/src/plugins/lua/multimap.lua
@@ -89,8 +89,11 @@ function check_multimap(task)
local ip = task:get_from_ip()
if ip then
local _,_,o1,o2,o3,o4 = string.find(ip, '(%d+)%.(%d+)%.(%d+)%.(%d+)')
- local rbl_str = o4 .. '.' .. o3 .. '.' .. o2 .. '.' .. o1 .. '.' .. rule['map']
- task:resolve_dns_a(rbl_str, 'multimap_rbl_cb')
+ if r then
+ -- TODO: cannot handle ipv6 addresses
+ local rbl_str = o4 .. '.' .. o3 .. '.' .. o2 .. '.' .. o1 .. '.' .. rule['map']
+ task:resolve_dns_a(rbl_str, 'multimap_rbl_cb')
+ end
end
elseif rule['type'] == 'rcpt' then
-- First try to get rcpt field