]> source.dussan.org Git - rspamd.git/commitdiff
Fix mistake: wrong use of string comparison 3/head
authorAndrew Lewis <nerf@judo.za.org>
Wed, 20 Nov 2013 19:41:59 +0000 (21:41 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Wed, 20 Nov 2013 19:41:59 +0000 (21:41 +0200)
src/plugins/lua/rbl.lua

index 9c577e814852bfbbd914e20c0a2a535e98ab836a..946e3b367f1907ad084a64ada1fdb94d02a4eac0 100644 (file)
@@ -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