]> source.dussan.org Git - rspamd.git/commitdiff
We should check here :is_valid() instead of :to_string() 145/head
authoreneq123 <you@example.com>
Wed, 11 Feb 2015 14:50:14 +0000 (17:50 +0300)
committereneq123 <you@example.com>
Wed, 11 Feb 2015 14:50:14 +0000 (17:50 +0300)
src/plugins/lua/once_received.lua

index 35c509badd9766fad3ff34556c8e418a328dea59..46a3e1b0925ac24ce3b15bb01a498f9fa334efdc 100644 (file)
@@ -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)