summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-01-22 13:17:33 +0100
committerGitHub <noreply@github.com>2024-01-22 13:17:33 +0100
commit9f3912182897bdacc0df36b061e6918003808eab (patch)
tree99803d5a26c2eae196e913b905abda81af51f5bb
parent34419458d99cf8d07279f92935c0f10d9b603f33 (diff)
parent0a436e1fce66391311799bc970f05f6f4ba880ad (diff)
downloadvyos-1x-9f3912182897bdacc0df36b061e6918003808eab.tar.gz
vyos-1x-9f3912182897bdacc0df36b061e6918003808eab.zip
Merge pull request #2873 from nicolas-fort/T5957
T5957: fix removal of interface in firewall rules.
-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 = '!='