From 94f03e0a5e127b441b2c5b6d29247d526a5c0992 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 27 Jan 2022 13:43:36 +0100 Subject: [PATCH] ruleset: properly render redirect targets without port Signed-off-by: Jo-Philipp Wich --- root/usr/share/firewall4/templates/redirect.uc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/usr/share/firewall4/templates/redirect.uc b/root/usr/share/firewall4/templates/redirect.uc index b710a04..592af0f 100644 --- a/root/usr/share/firewall4/templates/redirect.uc +++ b/root/usr/share/firewall4/templates/redirect.uc @@ -58,7 +58,7 @@ {%+ if (redirect.counter): -%} counter {%+ endif -%} {% if (redirect.target == "redirect"): -%} - redirect to {{ fw4.port(redirect.rport) }} + redirect{% if (redirect.rport): %} to {{ fw4.port(redirect.rport) }}{% endif %} {%- elif (redirect.target == "accept" || redirect.target == "masquerade"): -%} {{ redirect.target }} {%- else -%} -- 2.30.2