summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsarthurdev <965089+sarthurdev@users.noreply.github.com>2022-12-03 12:20:33 +0100
committersarthurdev <965089+sarthurdev@users.noreply.github.com>2022-12-03 12:20:33 +0100
commitf916f40ee9a726159c063952b879f8bce90c378c (patch)
treea3041b622e8604b0e7ee1d6cca7fda3fcec7890b /src
parent9a69e68b0f0affeac8aeab66783ae0249d67373f (diff)
downloadvyos-1x-f916f40ee9a726159c063952b879f8bce90c378c.tar.gz
vyos-1x-f916f40ee9a726159c063952b879f8bce90c378c.zip
firewall: T478: Fix firewall group circular dependency check
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/firewall.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conf_mode/firewall.py b/src/conf_mode/firewall.py
index 9fee20358..ae3dd6414 100755
--- a/src/conf_mode/firewall.py
+++ b/src/conf_mode/firewall.py
@@ -279,6 +279,8 @@ def verify_nested_group(group_name, group, groups, seen):
if 'include' not in group:
return
+ seen.append(group_name)
+
for g in group['include']:
if g not in groups:
raise ConfigError(f'Nested group "{g}" does not exist')
@@ -286,8 +288,6 @@ def verify_nested_group(group_name, group, groups, seen):
if g in seen:
raise ConfigError(f'Group "{group_name}" has a circular reference')
- seen.append(g)
-
if 'include' in groups[g]:
verify_nested_group(g, groups[g], groups, seen)