]> source.dussan.org Git - rspamd.git/commitdiff
[Fix]: ASN: dns cb func should also return in case of an error
authorJan-Philipp Benecke <jan-philipp@bnck.me>
Sun, 11 Jul 2021 18:23:16 +0000 (20:23 +0200)
committerJan-Philipp Benecke <jan-philipp@bnck.me>
Sun, 11 Jul 2021 18:44:22 +0000 (20:44 +0200)
src/plugins/lua/asn.lua

index f641ac53cab2fb49ed29412ba2dc240119774563..2b1c28956cc9fc456eb3462d724c523ce163bf9f 100644 (file)
@@ -71,6 +71,8 @@ local function asn_check(task)
       if dns_err and (dns_err ~= 'requested record is not found' and dns_err ~= 'no records with this name') then
         rspamd_logger.errx(task, 'error querying dns "%s" on %s: %s',
             req_name, serv, dns_err)
+        task:insert_result(options['symbol'] .. '_FAIL', 1, string.format('%s:%s', req_name, dns_err))
+        return
       end
       if not (results and results[1]) then
         rspamd_logger.infox(task, 'cannot query ip %s on %s: no results',