summaryrefslogtreecommitdiffstats
path: root/conf/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-03-29 16:18:54 -0700
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-03-29 16:18:54 -0700
commit142d36fbc6adb9dabaafd0bb6265ebadfed42821 (patch)
tree959f6c878451f41743cd57347229a4990ecde623 /conf/lua
parent53baa1a9af473dde1e64f82510fede7ca1c12292 (diff)
downloadrspamd-142d36fbc6adb9dabaafd0bb6265ebadfed42821.tar.gz
rspamd-142d36fbc6adb9dabaafd0bb6265ebadfed42821.zip
Fix hfilter.
Diffstat (limited to 'conf/lua')
-rw-r--r--conf/lua/hfilter.lua9
1 files changed, 3 insertions, 6 deletions
diff --git a/conf/lua/hfilter.lua b/conf/lua/hfilter.lua
index 775b59e04..f7c0751ed 100644
--- a/conf/lua/hfilter.lua
+++ b/conf/lua/hfilter.lua
@@ -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()