net/haproxy: fix ACL error check

This commit is contained in:
Frank Wall 2017-02-02 18:38:43 +01:00 committed by Franco Fichtner
parent c2a6b13f8f
commit a3176d9f8d

View file

@ -233,7 +233,7 @@
{% endif %}
{# # NOTE: We're ignoring actions if any ACL is erroneous, #}
{# # because doing otherwise would lead to unpredictable behaviour. #}
{% if acl_errors == '0' %}
{% if acl_errors|int == 0 %}
{% set action_enabled = '1' %}
{% set action_options = [] %}
{% if action_data.type == 'use_backend' %}
@ -424,18 +424,18 @@
{% if action_acls|length > 0 %}
# ACTION: {{action_data.name}}
{{action_options|join(' ')}} {{action_data.testType}} {{action_acls|join(join_operator)}}
{% else %}
{% else %}
# NOTE: actions with no ACLs/conditions will always match
# ACTION: {{action_data.name}}
{{action_options|join(' ')}}
{% endif %}
{% else %}
# ACTION INVALID: {{action_data.name}}
{% endif %}
{% else %}
# ACTION INVALID: {{action_data.name}}
# ACL ERROR COUNT: {{acl_errors}}
{% endif %}
{% else %}
# ACTION INVALID: {{action_data.name}}
# ACL ERROR COUNT: {{acl_errors}}
{% endif %}
{% endfor %}
{% else %}
# ERROR: AclsAndActions called with empty data