diff options
author | Nicolas Fort <nicolasfort1988@gmail.com> | 2024-07-03 09:53:56 -0300 |
---|---|---|
committer | Nicolas Fort <nicolasfort1988@gmail.com> | 2024-07-03 10:05:35 -0300 |
commit | 66ec278393dbabe71f320c543816f27797d51140 (patch) | |
tree | 026abdcf3d118138ead5cbbd6d9681bab1788c51 /src/migration-scripts/firewall/7-to-8 | |
parent | 148af29b68416a5b8d0e025a16aef252fdf31e67 (diff) | |
download | vyos-1x-66ec278393dbabe71f320c543816f27797d51140.tar.gz vyos-1x-66ec278393dbabe71f320c543816f27797d51140.zip |
T6536: change wildcard character from + to * - extend fix to interfaces defined in zone policy.
Diffstat (limited to 'src/migration-scripts/firewall/7-to-8')
-rw-r--r-- | src/migration-scripts/firewall/7-to-8 | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/migration-scripts/firewall/7-to-8 b/src/migration-scripts/firewall/7-to-8 index f46994ce2..b8bcc52cc 100644 --- a/src/migration-scripts/firewall/7-to-8 +++ b/src/migration-scripts/firewall/7-to-8 @@ -71,5 +71,11 @@ def migrate(config: ConfigTree) -> None: 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) + config.delete(zone_base)
\ No newline at end of file |