summaryrefslogtreecommitdiff
path: root/src/mod_fail2ban.erl
diff options
context:
space:
mode:
authorPaweł Chmielowski <pchmielowski@process-one.net>2016-06-21 13:18:24 +0200
committerPaweł Chmielowski <pchmielowski@process-one.net>2016-06-21 13:18:24 +0200
commit3a8da27d86058dae9e60467a08b146f9fc676736 (patch)
tree117fc3dadec3dca91fad5fb4646bd8248ec5ec52 /src/mod_fail2ban.erl
parentUse new access_rules_validator in couple places (diff)
Use {access,shaper}_rules_validator in other places where access rules are used
Diffstat (limited to '')
-rw-r--r--src/mod_fail2ban.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mod_fail2ban.erl b/src/mod_fail2ban.erl
index fed10670..f0460e70 100644
--- a/src/mod_fail2ban.erl
+++ b/src/mod_fail2ban.erl
@@ -167,7 +167,7 @@ code_change(_OldVsn, State, _Extra) ->
%%%===================================================================
is_whitelisted(Host, Addr) ->
Access = gen_mod:get_module_opt(Host, ?MODULE, access,
- fun(A) when is_atom(A) -> A end,
+ fun(A) -> A end,
none),
acl:match_rule(Host, Access, Addr) == allow.
@@ -187,7 +187,7 @@ format_date({{Year, Month, Day}, {Hour, Minute, Second}}) ->
[Hour, Minute, Second, Day, Month, Year]).
mod_opt_type(access) ->
- fun (A) when is_atom(A) -> A end;
+ fun acl:access_rules_validator/1;
mod_opt_type(c2s_auth_ban_lifetime) ->
fun (T) when is_integer(T), T > 0 -> T end;
mod_opt_type(c2s_max_auth_failures) ->