Skip to content

Commit a91cd95

Browse files
committed
fix(zone): the forward statement was set in the rule section
1 parent f34a480 commit a91cd95

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

firewalld/files/zone.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@
3333
{%- if 'masquerade' in rule %}
3434
{%- if rule.masquerade %}<masquerade/>{%- endif %}
3535
{%- endif %}
36-
{%- if 'forward' in rule %}
37-
{%- if rule.forward %}<forward/>{%- endif %}
38-
{%- endif %}
3936
{%- if 'forward_port' in rule %}
4037
{%- if 'comment' in rule.forward_port %}
4138
<!-- {{ rule.forward_port.comment }} -->
@@ -139,6 +136,9 @@
139136
<forward-port port="{{ v.portid }}" protocol="{{ v.protocol }}"{%- if 'to_port' in v %} to-port="{{ v.to_port }}"{%- endif %}{%- if 'to_addr' in v %} to-addr="{{ v.to_addr }}"{%- endif %} />
140137
{%- endfor %}
141138
{%- endif %}
139+
{%- if 'forward' in zone %}
140+
{%- if rule.forward %}<forward/>{%- endif %}
141+
{%- endif %}
142142
{%- if 'source_ports' in zone %}
143143
{%- for v in zone.source_ports %}
144144
{%- if 'comment' in v %}

test/integration/default/files/_mapdata/almalinux-8.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ values:
112112
are accepted.
113113
other_services:
114114
- zabbixcustom
115+
forward: true
115116
ports:
116117
- comment: zabbix-agent
117118
port: 10050

0 commit comments

Comments
 (0)