From: eneq123 Date: Wed, 11 Feb 2015 14:50:14 +0000 (+0300) Subject: We should check here :is_valid() instead of :to_string() X-Git-Tag: 0.9.0~730^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2b75c0189d409941e1e12af6f5e9e47d4fd02bc2;p=rspamd.git We should check here :is_valid() instead of :to_string() --- 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)