summaryrefslogtreecommitdiff
path: root/src/migration-scripts/firewall/7-to-8
diff options
context:
space:
mode:
authorNicolas Fort <nicolasfort1988@gmail.com>2024-07-03 09:53:56 -0300
committerChristian Breunig <christian@breunig.cc>2024-07-03 19:16:27 +0200
commit20d4ffd527ccea5fb78f2f9e56c887bbc041b1e0 (patch)
treefdc72c0e3a834f25a218da8c89c9befefbbb8b18 /src/migration-scripts/firewall/7-to-8
parent8c43dea52c1f3507b8176d7dd3e146f0cb8d476d (diff)
downloadvyos-1x-20d4ffd527ccea5fb78f2f9e56c887bbc041b1e0.tar.gz
vyos-1x-20d4ffd527ccea5fb78f2f9e56c887bbc041b1e0.zip
T6536: change wildcard character from + to * - extend fix to interfaces defined in zone policy.
(cherry picked from commit 66ec278393dbabe71f320c543816f27797d51140)
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)