]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Add more guards for IP address
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 2 Mar 2016 12:58:26 +0000 (12:58 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 2 Mar 2016 12:58:26 +0000 (12:58 +0000)
src/plugins/lua/once_received.lua

index 7d084a991dd281f40fc217991661327cc3ce8175..4bac5adff000d5d6ebfd69f5b42337423af5241e 100644 (file)
@@ -77,7 +77,7 @@ local function check_quantity_received (task)
   local hn = task:get_hostname()
 
   -- Here we don't care about received
-  if (not hn or hn == 'unknown') and task_ip then
+  if (not hn or hn == 'unknown') and task_ip and task_ip:is_valid() then
     task:get_resolver():resolve_ptr({task = task,
       name = task_ip:to_string(),
       callback = recv_dns_cb