From 3ee6a5c54d5c32a635870fae402420d8c653476c Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 28 Jan 2022 12:06:16 +0100 Subject: [PATCH] ruleset: fix undeclared variable access uncovered by strict mode Signed-off-by: Jo-Philipp Wich --- root/usr/share/firewall4/templates/ruleset.uc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/root/usr/share/firewall4/templates/ruleset.uc b/root/usr/share/firewall4/templates/ruleset.uc index e9692d7..004cfca 100644 --- a/root/usr/share/firewall4/templates/ruleset.uc +++ b/root/usr/share/firewall4/templates/ruleset.uc @@ -274,7 +274,7 @@ table inet fw4 { {% if (rule.devices_neg || rule.subnets_neg || devices_pos || subnets_pos): %} {%+ if (rule.family): -%} meta nfproto {{ fw4.nfproto(rule.family) }} {%+ endif -%} - {%+ include("zone-match.uc", { fw4, rule: { ...rule, devices_pos, subnets_pos } }) -%} + {%+ include("zone-match.uc", { fw4, egress: false, rule: { ...rule, devices_pos, subnets_pos } }) -%} jump {{ target }}_{{ zone.name }} comment "!fw4: {{ zone.name }} {{ fw4.nfproto(rule.family, true) }} {{ (target == "helper") ? "CT helper assignment" : "CT bypass" }}" @@ -296,7 +296,7 @@ table inet fw4 { {% if (devices_pos || subnets_pos): %} {%+ if (rule.family): -%} meta nfproto {{ fw4.nfproto(rule.family) }} {%+ endif -%} - {%+ include("zone-match.uc", { fw4, rule: { ...rule, devices_pos, subnets_pos } }) -%} + {%+ include("zone-match.uc", { fw4, egress: false, rule: { ...rule, devices_pos, subnets_pos } }) -%} jump {{ target }}_{{ zone.name }} comment "!fw4: {{ zone.name }} {{ fw4.nfproto(rule.family, true) }} {{ (target == "helper") ? "CT helper assignment" : "CT bypass" }}" -- 2.30.2