summaryrefslogtreecommitdiff
path: root/python/vyos/firewall.py
diff options
context:
space:
mode:
authorNicolas Fort <nicolasfort1988@gmail.com>2024-01-22 11:28:20 +0000
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-01-22 12:18:42 +0000
commit9ba9b53cbc611c6579253ba8b86c39b127a5e224 (patch)
treeb66b009dda86f92476cc5779fd4d7c0d6afcd140 /python/vyos/firewall.py
parent7f7cf25cdd84da7c2b99c0913e5ba25d999b3978 (diff)
downloadvyos-1x-9ba9b53cbc611c6579253ba8b86c39b127a5e224.tar.gz
vyos-1x-9ba9b53cbc611c6579253ba8b86c39b127a5e224.zip
T5957: fix removal of interface in firewall rules.
(cherry picked from commit 0a436e1fce66391311799bc970f05f6f4ba880ad)
Diffstat (limited to 'python/vyos/firewall.py')
-rw-r--r--python/vyos/firewall.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/vyos/firewall.py b/python/vyos/firewall.py
index a2622fa00..28ebf282c 100644
--- a/python/vyos/firewall.py
+++ b/python/vyos/firewall.py
@@ -280,7 +280,7 @@ def parse_rule(rule_conf, hook, fw_name, rule_id, ip_name):
operator = '!='
iiface = iiface[1:]
output.append(f'iifname {operator} {{{iiface}}}')
- else:
+ elif 'group' in rule_conf['inbound_interface']:
iiface = rule_conf['inbound_interface']['group']
if iiface[0] == '!':
operator = '!='
@@ -295,7 +295,7 @@ def parse_rule(rule_conf, hook, fw_name, rule_id, ip_name):
operator = '!='
oiface = oiface[1:]
output.append(f'oifname {operator} {{{oiface}}}')
- else:
+ elif 'group' in rule_conf['outbound_interface']:
oiface = rule_conf['outbound_interface']['group']
if oiface[0] == '!':
operator = '!='