diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-03-29 16:18:54 -0700 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-03-29 16:18:54 -0700 |
commit | 142d36fbc6adb9dabaafd0bb6265ebadfed42821 (patch) | |
tree | 959f6c878451f41743cd57347229a4990ecde623 | |
parent | 53baa1a9af473dde1e64f82510fede7ca1c12292 (diff) | |
download | rspamd-142d36fbc6adb9dabaafd0bb6265ebadfed42821.tar.gz rspamd-142d36fbc6adb9dabaafd0bb6265ebadfed42821.zip |
Fix hfilter.
-rw-r--r-- | conf/lua/hfilter.lua | 9 |
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() |