]> source.dussan.org Git - rspamd.git/commitdiff
Fix hfilter.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 29 Mar 2014 23:18:54 +0000 (16:18 -0700)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 29 Mar 2014 23:18:54 +0000 (16:18 -0700)
conf/lua/hfilter.lua

index 775b59e0422c391f28490ffe445bca5f6d749575..f7c0751eddf0c24325a2e6bd8685416662335124 100644 (file)
@@ -161,12 +161,9 @@ local function hfilter(task)
     --IP--
     local ip = false
     local rip = task:get_from_ip()
-        if rip then
-            ip = rip:to_string()
-            if ip and (ip == '0.0.0.0' or ip == '::') then
-                ip = false
-            end
-        end
+    if rip:is_valid() then
+        ip = rip:to_string()
+    end
     
     --HOSTNAME--
     local hostname = task:get_hostname()