diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-12-03 15:26:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-03 15:26:57 +0100 |
commit | 1804f1cb1a9026fe07b49f5d65460875423534bc (patch) | |
tree | 025f7fada89e1880abd29b9aedef2d54b7cb6617 /src/conf_mode/firewall.py | |
parent | 71aecaa50fb2b7857fea7fb3cf097830aaecf481 (diff) | |
parent | f916f40ee9a726159c063952b879f8bce90c378c (diff) | |
download | vyos-1x-1804f1cb1a9026fe07b49f5d65460875423534bc.tar.gz vyos-1x-1804f1cb1a9026fe07b49f5d65460875423534bc.zip |
Merge pull request #1691 from sarthurdev/T478
firewall: T478: Fix firewall group circular dependency check
Diffstat (limited to 'src/conf_mode/firewall.py')
-rwxr-xr-x | src/conf_mode/firewall.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conf_mode/firewall.py b/src/conf_mode/firewall.py index 38a332be3..f68acfe02 100755 --- a/src/conf_mode/firewall.py +++ b/src/conf_mode/firewall.py @@ -276,6 +276,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') @@ -283,8 +285,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) |