aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lewis <nerf@judo.za.org>2013-11-20 21:41:59 +0200
committerAndrew Lewis <nerf@judo.za.org>2013-11-20 21:41:59 +0200
commit959f4663bf31a6a1025a09a63e853c40833f53b0 (patch)
tree8f8407cd99f10def64cfd5ef03a4f03df0c573db
parente35a8012347fa4cff4d6c3eca2f69fd1f96a336d (diff)
downloadrspamd-959f4663bf31a6a1025a09a63e853c40833f53b0.tar.gz
rspamd-959f4663bf31a6a1025a09a63e853c40833f53b0.zip
Fix mistake: wrong use of string comparison
-rw-r--r--src/plugins/lua/rbl.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua
index 9c577e814..946e3b367 100644
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@ -31,8 +31,8 @@ local function rbl_cb (task)
local rip = task:get_from_ip()
if(rip ~= "0.0.0.0") then
for _,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
+ if (rip:get_version() == 6 and rbl['ipv6'] and rbl['from']) or
+ (rip:get_version() == 4 and rbl['ipv4'] and rbl['from']) then
task:get_resolver():resolve_a(task:get_session(), task:get_mempool(),
ip_to_rbl(rip, rbl['rbl']), rbl_dns_cb, rbl['symbol'])
end
@@ -42,8 +42,8 @@ local function rbl_cb (task)
for _,rh in ipairs(recvh) do
if rh['real_ip'] then
for _,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
+ 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
task:get_resolver():resolve_a(task:get_session(), task:get_mempool(),
ip_to_rbl(rh['real_ip'], rbl['rbl']), rbl_dns_cb, rbl['symbol'])
end