summaryrefslogtreecommitdiff
path: root/data/templates/firewall/nftables-defines.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-04-13 22:52:54 +0200
committerChristian Poessinger <christian@poessinger.com>2022-04-13 22:55:46 +0200
commit90a84a0bb1f7293a8df76f3449efcc7da813c425 (patch)
tree32d896d991c56b175ae873063e6e46e92550cac5 /data/templates/firewall/nftables-defines.tmpl
parent97ffa1cc71bc6d5dc38a4b26fcaae9c29da24fb5 (diff)
downloadvyos-1x-90a84a0bb1f7293a8df76f3449efcc7da813c425.tar.gz
vyos-1x-90a84a0bb1f7293a8df76f3449efcc7da813c425.zip
firewall: T4333: migrate to new vyos_defined Jinja2 test
Diffstat (limited to 'data/templates/firewall/nftables-defines.tmpl')
-rw-r--r--data/templates/firewall/nftables-defines.tmpl14
1 files changed, 7 insertions, 7 deletions
diff --git a/data/templates/firewall/nftables-defines.tmpl b/data/templates/firewall/nftables-defines.tmpl
index d9eb7c199..66d31093b 100644
--- a/data/templates/firewall/nftables-defines.tmpl
+++ b/data/templates/firewall/nftables-defines.tmpl
@@ -1,30 +1,30 @@
-{% if group is defined %}
-{% if group.address_group is defined %}
+{% if group is vyos_defined %}
+{% if group.address_group is vyos_defined %}
{% for group_name, group_conf in group.address_group.items() %}
define A_{{ group_name }} = { {{ group_conf.address | join(",") }} }
{% endfor %}
{% endif %}
-{% if group.ipv6_address_group is defined %}
+{% if group.ipv6_address_group is vyos_defined %}
{% for group_name, group_conf in group.ipv6_address_group.items() %}
define A6_{{ group_name }} = { {{ group_conf.address | join(",") }} }
{% endfor %}
{% endif %}
-{% if group.mac_group is defined %}
+{% if group.mac_group is vyos_defined %}
{% for group_name, group_conf in group.mac_group.items() %}
define M_{{ group_name }} = { {{ group_conf.mac_address | join(",") }} }
{% endfor %}
{% endif %}
-{% if group.network_group is defined %}
+{% if group.network_group is vyos_defined %}
{% for group_name, group_conf in group.network_group.items() %}
define N_{{ group_name }} = { {{ group_conf.network | join(",") }} }
{% endfor %}
{% endif %}
-{% if group.ipv6_network_group is defined %}
+{% if group.ipv6_network_group is vyos_defined %}
{% for group_name, group_conf in group.ipv6_network_group.items() %}
define N6_{{ group_name }} = { {{ group_conf.network | join(",") }} }
{% endfor %}
{% endif %}
-{% if group.port_group is defined %}
+{% if group.port_group is vyos_defined %}
{% for group_name, group_conf in group.port_group.items() %}
define P_{{ group_name }} = { {{ group_conf.port | join(",") }} }
{% endfor %}