From e4e3840ad5ede376e52b18e0aff777c25176a2e8 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 26 Jun 2021 16:56:12 +0200 Subject: nat: T1083: fix Jinja2 templating error Commit 166d44b3 ("nat: T1083: add translation options for persistent/random mapping of address and port") added support for persistent IP address and port mappings for NAT. Unfortunately one if clause got lost in translation. --- data/templates/firewall/nftables-nat.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/templates/firewall/nftables-nat.tmpl b/data/templates/firewall/nftables-nat.tmpl index e2776e9c2..40ed1b916 100644 --- a/data/templates/firewall/nftables-nat.tmpl +++ b/data/templates/firewall/nftables-nat.tmpl @@ -73,8 +73,8 @@ {% set trns_addr = 'return' %} {% set trns_port = '' %} {% endif %} -{# T1083: NAT address and port translation options #} -{% if config.translation.options is defined and config.translation.options is not none %} +{# T1083: NAT address and port translation options #} +{% if config.translation is defined and config.translation.options is defined and config.translation.options is not none %} {% if config.translation.options.address_mapping is defined and config.translation.options.address_mapping == "persistent" %} {% set trns_opts_addr = 'persistent' %} {% endif %} -- cgit v1.2.3