From 704d1496b61e3c71120533ce0fdf808c59d6bce8 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 2 Jul 2018 15:04:10 +0100 Subject: [PATCH] [Minor] Allow to restore the previous behaviour in asn module --- src/plugins/lua/asn.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.47.3