From: eneq123 Date: Wed, 11 Feb 2015 13:10:21 +0000 (+0300) Subject: real_ip to_string should not nil X-Git-Tag: 0.9.0~730^2~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b0c74e7f5af9006149c7143aee78fad68576181f;p=rspamd.git real_ip to_string should not nil --- diff --git a/src/plugins/lua/once_received.lua b/src/plugins/lua/once_received.lua index 3631aaacc..35c509bad 100644 --- a/src/plugins/lua/once_received.lua +++ b/src/plugins/lua/once_received.lua @@ -48,10 +48,10 @@ 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'] then + if r['real_ip'] and r['real_ip']:to_string() then -- Try to resolve it again task:get_resolver():resolve_ptr(task:get_session(), task:get_mempool(), - tostring(r['real_ip']), recv_dns_cb) + r['real_ip']:to_string(), recv_dns_cb) else task:insert_result(symbol_strict, 1) end