add option to disable counter for single rules
This commit is contained in:
parent
c9088a7a24
commit
fb6e4ad1df
2 changed files with 2 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ firewall:
|
||||||
statement: accept
|
statement: accept
|
||||||
matches: ~
|
matches: ~
|
||||||
priority: 1000
|
priority: 1000
|
||||||
|
counter: True
|
||||||
input: {}
|
input: {}
|
||||||
forward: {}
|
forward: {}
|
||||||
output: {}
|
output: {}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
#!/usr/sbin/nft -f
|
#!/usr/sbin/nft -f
|
||||||
|
|
||||||
{%- macro nftrule(rule) -%}
|
{%- 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 %}
|
{% endmacro %}
|
||||||
|
|
||||||
{%- macro nftchain(name) -%}
|
{%- macro nftchain(name) -%}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue