From 1fb1e8721b4c3fcd01c9fcae64eaf78e220ee84f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chmielowski?= Date: Thu, 16 Jun 2016 11:04:01 +0200 Subject: [PATCH] Allow using shaper defined by name like in in s2s_shaper: fast --- src/acl.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/acl.erl b/src/acl.erl index 2840c5880..693219ebe 100644 --- a/src/acl.erl +++ b/src/acl.erl @@ -515,10 +515,12 @@ parse_ip_netmask(S) -> _ -> error end. +transform_access_rules_config(Config) when is_list(Config) -> + lists:map(fun transform_access_rules_config2/1, lists:flatten(Config)); transform_access_rules_config(Config) -> - lists:map(fun transform_access_rules_config2/1, lists:flatten(Config)). + transform_access_rules_config([Config]). -transform_access_rules_config2(Type) when is_integer(Type); Type == allow; Type == deny -> +transform_access_rules_config2(Type) when is_integer(Type); is_atom(Type) -> {Type, [all]}; transform_access_rules_config2({Type, ACL}) when is_atom(ACL) -> {Type, [{acl, ACL}]};