add option to disable counter for single rules

This commit is contained in:
nd 2021-09-25 15:02:49 +02:00
parent c9088a7a24
commit fb6e4ad1df
No known key found for this signature in database
GPG key ID: 21B5CD4DEE3670E9
2 changed files with 2 additions and 1 deletions

View file

@ -2,7 +2,7 @@
#!/usr/sbin/nft -f
{%- macro nftrule(rule) -%}
{{rule.matches }} {% if not rule.statement == "counter" %}counter {% endif %}{{ rule.statement }} comment "{{ rule.comment }}"
{{rule.matches }} {% if not rule.statement == "counter" or not rule.counter %}counter {% endif %}{{ rule.statement }} comment "{{ rule.comment }}"
{% endmacro %}
{%- macro nftchain(name) -%}