From: Vsevolod Stakhov Date: Mon, 2 Jul 2018 14:04:10 +0000 (+0100) Subject: [Minor] Allow to restore the previous behaviour in asn module X-Git-Tag: 1.7.7~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=704d1496b61e3c71120533ce0fdf808c59d6bce8;p=thirdparty%2Frspamd.git [Minor] Allow to restore the previous behaviour in asn module --- diff --git a/src/plugins/lua/asn.lua b/src/plugins/lua/asn.lua index d8771b677b..86f1c42d22 100644 --- a/src/plugins/lua/asn.lua +++ b/src/plugins/lua/asn.lua @@ -33,6 +33,7 @@ local options = { symbol = 'ASN', expire = 86400, -- 1 day by default key_prefix = 'rasn', + check_local = false, } local rspamd_re = rspamd_regexp.create_cached("[\\|\\s]") @@ -78,7 +79,7 @@ local function asn_check(task) end local ip = task:get_from_ip() - if not (ip and ip:is_valid()) or ip:is_local() then return end + if not (ip and ip:is_valid()) or (not options.check_local and ip:is_local()) then return end asn_check_func[options['provider_type']](ip) end