summaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2022-08-16 16:05:23 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2022-08-16 16:05:23 +0000
commitd0858015f121416a042ec847c01fefb733661bab (patch)
tree0d673e6b961a3b33628551ce09ca345f9b4876f7 /data/templates
parenta21669ee5c87425a2eb91631eb00774b30249c8e (diff)
downloadvyos-1x-d0858015f121416a042ec847c01fefb733661bab.tar.gz
vyos-1x-d0858015f121416a042ec847c01fefb733661bab.zip
UPnP: T4620: Fix Jinja2 template rules
Diffstat (limited to 'data/templates')
-rw-r--r--data/templates/firewall/upnpd.conf.j26
1 files changed, 3 insertions, 3 deletions
diff --git a/data/templates/firewall/upnpd.conf.j2 b/data/templates/firewall/upnpd.conf.j2
index 27573cbf9..b993052b4 100644
--- a/data/templates/firewall/upnpd.conf.j2
+++ b/data/templates/firewall/upnpd.conf.j2
@@ -129,7 +129,7 @@ lease_file=/config/upnp.leases
#serial=12345678
#model_number=1
-{% if rules is vyos_defined %}
+{% if rule is vyos_defined %}
# UPnP permission rules
# (allow|deny) (external port range) IP/mask (internal port range)
# A port range is <min port>-<max port> or <port> if there is only
@@ -142,8 +142,8 @@ lease_file=/config/upnp.leases
# modify the IP ranges to match their own internal networks, and
# also consider implementing network-specific restrictions
# CAUTION: failure to enforce any rules may permit insecure requests to be made!
-{% for rule, config in rules.items() %}
-{% if config.disable is vyos_defined %}
+{% for rule, config in rule.items() %}
+{% if config.disable is not vyos_defined %}
{{ config.action }} {{ config.external_port_range }} {{ config.ip }} {{ config.internal_port_range }}
{% endif %}
{% endfor %}