]> source.dussan.org Git - rspamd.git/commitdiff
Settings: fix IP match 468/head
authorAndrew Lewis <nerf@judo.za.org>
Sat, 2 Jan 2016 21:44:38 +0000 (23:44 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Sat, 2 Jan 2016 21:44:38 +0000 (23:44 +0200)
src/plugins/lua/settings.lua

index a370575917e7d2cb5ba8eb207c5672ba2c2bf2cf..32d256d656677a5723025e55d31751657d064bd6 100644 (file)
@@ -125,10 +125,10 @@ local function check_settings(task)
   local function check_ip_setting(rule, ip)
     if rule[2] ~= 0 then
       local nip = ip:apply_mask(rule[2])
-      if nip and nip == rule[1] then
+      if nip and nip:to_string() == rule[1]:to_string() then
         return true
       end
-    elseif ip == rule[1] then
+    elseif ip:to_string() == rule[1]:to_string() then
       return true
     end