diff options
author | Nicolas Fort <nicolasfort1988@gmail.com> | 2023-11-28 12:36:53 +0000 |
---|---|---|
committer | Bjarke Istrup Pedersen <gurli@gurlinet.dk> | 2023-12-15 21:28:51 +0100 |
commit | c0cefb3b267a1e5e3ad218657eae8a035e663823 (patch) | |
tree | 0d476b28f31149b6fee78c1b0a2136a7bed23cfc /src/migration-scripts/firewall/12-to-13 | |
parent | fcedc85e2b4d3d6663b0c78c3fb3bd93db91fcc2 (diff) | |
download | vyos-1x-c0cefb3b267a1e5e3ad218657eae8a035e663823.tar.gz vyos-1x-c0cefb3b267a1e5e3ad218657eae8a035e663823.zip |
T5575: Update migration scripts for state policy parsing
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']: |