diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-07-02 15:04:10 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-07-02 15:06:54 +0100 |
commit | 704d1496b61e3c71120533ce0fdf808c59d6bce8 (patch) | |
tree | 60370d452d92e5afe2743d52e1a2af44f4af853f /src | |
parent | 5e839749609dd5f1afe86a5a6db44fe996b4f768 (diff) | |
download | rspamd-704d1496b61e3c71120533ce0fdf808c59d6bce8.tar.gz rspamd-704d1496b61e3c71120533ce0fdf808c59d6bce8.zip |
[Minor] Allow to restore the previous behaviour in asn module
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/lua/asn.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/lua/asn.lua b/src/plugins/lua/asn.lua index d8771b677..86f1c42d2 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 |