diff options
author | Daniil Baturin <daniil@vyos.io> | 2023-12-07 15:21:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-07 15:21:04 +0000 |
commit | f604c177c5182719674c6540006eb10571bc81a4 (patch) | |
tree | fa9eec1af54e4117e926877aa83afcdcff32166d /src/migration-scripts/firewall/12-to-13 | |
parent | 264f23b95090ada20eef796525383697a06c13cb (diff) | |
parent | 4ded8814f036b921a04a54850ca6717aafe91a52 (diff) | |
download | vyos-1x-f604c177c5182719674c6540006eb10571bc81a4.tar.gz vyos-1x-f604c177c5182719674c6540006eb10571bc81a4.zip |
Merge pull request #2539 from nicolas-fort/T5775
T5775: firewall: re-add state-policy to firewall. These commands are …
Diffstat (limited to 'src/migration-scripts/firewall/12-to-13')
-rwxr-xr-x | src/migration-scripts/firewall/12-to-13 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/migration-scripts/firewall/12-to-13 b/src/migration-scripts/firewall/12-to-13 index 4eaae779b..8396dd9d1 100755 --- a/src/migration-scripts/firewall/12-to-13 +++ b/src/migration-scripts/firewall/12-to-13 @@ -49,6 +49,15 @@ if not config.exists(base): # Nothing to do exit(0) +# State Policy logs: +if config.exists(base + ['global-options', 'state-policy']): + for state in config.list_nodes(base + ['global-options', 'state-policy']): + if config.exists(base + ['global-options', 'state-policy', state, 'log']): + log_value = config.return_value(base + ['global-options', 'state-policy', state, 'log']) + config.delete(base + ['global-options', 'state-policy', state, 'log']) + if log_value == 'enable': + config.set(base + ['global-options', 'state-policy', state, 'log']) + for family in ['ipv4', 'ipv6', 'bridge']: if config.exists(base + [family]): for hook in ['forward', 'input', 'output', 'name']: |