summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-01-22 15:42:49 +0100
committerGitHub <noreply@github.com>2024-01-22 15:42:49 +0100
commitb61a06aa54657b9b128b0c6350b3cb861339ae9c (patch)
treebf41f0eadbec7b286f0cb76c85c91c2c425fcb4c /python
parent0b2f73f09800152b601884829f76b10c9f313d31 (diff)
parent9ba9b53cbc611c6579253ba8b86c39b127a5e224 (diff)
downloadvyos-1x-b61a06aa54657b9b128b0c6350b3cb861339ae9c.tar.gz
vyos-1x-b61a06aa54657b9b128b0c6350b3cb861339ae9c.zip
Merge pull request #2875 from vyos/mergify/bp/sagitta/pr-2873
T5957: fix removal of interface in firewall rules. (backport #2873)
Diffstat (limited to 'python')
-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 = '!='