summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/lua/multimap.lua2
-rw-r--r--src/plugins/lua/rbl.lua4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua
index 229d594cf..1711c212e 100644
--- a/src/plugins/lua/multimap.lua
+++ b/src/plugins/lua/multimap.lua
@@ -66,7 +66,7 @@ local function check_multimap(task)
end
elseif rule['type'] == 'dnsbl' then
local ip = task:get_from_ip()
- if ip and ip ~= "0.0.0.0" then
+ if ip and ip:to_string() ~= "0.0.0.0" then
if ip:get_version() == 6 and rule['ipv6'] then
task:get_resolver():resolve_a(task:get_session(), task:get_mempool(),
ip_to_rbl(ip, rule['map']), multimap_rbl_cb, rule['map'])
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua
index cb827e854..e7e720908 100644
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@ -78,7 +78,7 @@ local function rbl_cb (task)
end
local rip = task:get_from_ip()
- if(rip:to_string() ~= "0.0.0.0") then
+ if rip and (rip:to_string() ~= '0.0.0.0') then
for k,rbl in pairs(rbls) do
if (rip:get_version() == 6 and rbl['ipv6'] and rbl['from']) or
(rip:get_version() == 4 and rbl['ipv4'] and rbl['from']) then
@@ -89,7 +89,7 @@ local function rbl_cb (task)
end
local recvh = task:get_received_headers()
for _,rh in ipairs(recvh) do
- if rh['real_ip'] then
+ if rh['real_ip'] and rh['real_ip']:to_string() ~= '0.0.0.0' then
for k,rbl in pairs(rbls) do
if (rh['real_ip']:get_version() == 6 and rbl['ipv6'] and rbl['received']) or
(rh['real_ip']:get_version() == 4 and rbl['ipv4'] and rbl['received']) then