summaryrefslogtreecommitdiff
path: root/src/migration-scripts/firewall/12-to-13
diff options
context:
space:
mode:
authorNicolas Fort <nicolasfort1988@gmail.com>2023-11-28 12:36:53 +0000
committerNicolas Fort <nicolasfort1988@gmail.com>2023-11-28 12:36:53 +0000
commit4ded8814f036b921a04a54850ca6717aafe91a52 (patch)
tree8f88ea6a922f5dfba5b6c078cdf643495a467c6c /src/migration-scripts/firewall/12-to-13
parent64ee13cf9374d6e726570a8d0083c2e7a386a873 (diff)
downloadvyos-1x-4ded8814f036b921a04a54850ca6717aafe91a52.tar.gz
vyos-1x-4ded8814f036b921a04a54850ca6717aafe91a52.zip
T5575: Update migration scripts for state policy parsing
Diffstat (limited to 'src/migration-scripts/firewall/12-to-13')
-rwxr-xr-xsrc/migration-scripts/firewall/12-to-139
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']: