summaryrefslogtreecommitdiff
path: root/src/migration-scripts/firewall/7-to-8
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-07-03 21:18:42 +0200
committerGitHub <noreply@github.com>2024-07-03 21:18:42 +0200
commite4e32d9a2d9f9085524e9408561717e0f0b821a5 (patch)
tree479b106af697d29f78f3bc8ba7a979f1433e027a /src/migration-scripts/firewall/7-to-8
parentc85e7223dbcc7973eb71c15a26a5518b883c21a9 (diff)
parentd38c917949018feae464bcee6b097c0d02fdc7ed (diff)
downloadvyos-1x-e4e32d9a2d9f9085524e9408561717e0f0b821a5.tar.gz
vyos-1x-e4e32d9a2d9f9085524e9408561717e0f0b821a5.zip
Merge pull request #3761 from vyos/mergify/bp/circinus/pr-3749
T6536: nat: add migration script that replaces wildcard charater (backport #3749)
Diffstat (limited to 'src/migration-scripts/firewall/7-to-8')
-rwxr-xr-xsrc/migration-scripts/firewall/7-to-86
1 files changed, 6 insertions, 0 deletions
diff --git a/src/migration-scripts/firewall/7-to-8 b/src/migration-scripts/firewall/7-to-8
index bbaba113a..17af0f355 100755
--- a/src/migration-scripts/firewall/7-to-8
+++ b/src/migration-scripts/firewall/7-to-8
@@ -84,6 +84,12 @@ if config.exists(zone_base + ['zone']):
config.set_tag(['firewall', 'zone'])
for zone in config.list_nodes(zone_base + ['zone']):
+ if 'interface' in config.list_nodes(zone_base + ['zone', zone]):
+ for iface in config.return_values(zone_base + ['zone', zone, 'interface']):
+ if '+' in iface:
+ config.delete_value(zone_base + ['zone', zone, 'interface'], value=iface)
+ iface = iface.replace('+', '*')
+ config.set(zone_base + ['zone', zone, 'interface'], value=iface, replace=False)
config.copy(zone_base + ['zone', zone], ['firewall', 'zone', zone])
config.delete(zone_base)