From: Jan-Philipp Benecke Date: Sun, 11 Jul 2021 18:23:16 +0000 (+0200) Subject: [Fix]: ASN: dns cb func should also return in case of an error X-Git-Tag: 3.0~179^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7117a1f315cf88e633eddd5dff54a6b97088a32f;p=thirdparty%2Frspamd.git [Fix]: ASN: dns cb func should also return in case of an error --- diff --git a/src/plugins/lua/asn.lua b/src/plugins/lua/asn.lua index f641ac53ca..2b1c28956c 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',