commit 7117a1f: [Fix]: ASN: dns cb func should also return in case of an error

Jan-Philipp Benecke jan-philipp at bnck.me
Sun Jul 11 20:49:04 UTC 2021


Author: Jan-Philipp Benecke
Date: 2021-07-11 20:23:16 +0200
URL: https://github.com/rspamd/rspamd/commit/7117a1f315cf88e633eddd5dff54a6b97088a32f

[Fix]: ASN: dns cb func should also return in case of an error

---
 src/plugins/lua/asn.lua | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/plugins/lua/asn.lua b/src/plugins/lua/asn.lua
index f641ac53c..2b1c28956 100644
--- a/src/plugins/lua/asn.lua
+++ b/src/plugins/lua/asn.lua
@@ -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',


More information about the Commits mailing list