summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authoreneq123 <you@example.com>2015-02-11 17:50:14 +0300
committereneq123 <you@example.com>2015-02-11 17:50:14 +0300
commit2b75c0189d409941e1e12af6f5e9e47d4fd02bc2 (patch)
treebd24f8a821755e7f08602e6b69e72cb38affebbc /src/plugins
parentac0d8c035e05209b320d6a5020211fdee84410ed (diff)
downloadrspamd-2b75c0189d409941e1e12af6f5e9e47d4fd02bc2.tar.gz
rspamd-2b75c0189d409941e1e12af6f5e9e47d4fd02bc2.zip
We should check here :is_valid() instead of :to_string()
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/lua/once_received.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/lua/once_received.lua b/src/plugins/lua/once_received.lua
index 35c509bad..46a3e1b09 100644
--- a/src/plugins/lua/once_received.lua
+++ b/src/plugins/lua/once_received.lua
@@ -48,7 +48,7 @@ local function check_quantity_received (task)
if not r['real_hostname'] or string.lower(r['real_hostname']) == 'unknown' or
string.match(r['real_hostname'], '^%d+%.%d+%.%d+%.%d+$') then
- if r['real_ip'] and r['real_ip']:to_string() then
+ if r['real_ip'] and r['real_ip']:is_valid() then
-- Try to resolve it again
task:get_resolver():resolve_ptr(task:get_session(), task:get_mempool(),
r['real_ip']:to_string(), recv_dns_cb)