summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-09-22 20:02:17 +0200
committerChristian Poessinger <christian@poessinger.com>2022-09-22 20:02:36 +0200
commit35d8141575c3677b7e70e053c416634fc55b3bf4 (patch)
tree1a4836f8fd15ddc4a7c34645e9ec3621e0ef7b9f
parente1d3fd0b29a1178e775cbc86f6c0011a682506ba (diff)
downloadvyos-1x-35d8141575c3677b7e70e053c416634fc55b3bf4.tar.gz
vyos-1x-35d8141575c3677b7e70e053c416634fc55b3bf4.zip
ipoe: T4703: fix migration of vlan node for loca authenticated users
-rw-r--r--smoketest/configs/ipoe-server1
-rwxr-xr-xsrc/migration-scripts/ipoe-server/0-to-16
2 files changed, 7 insertions, 0 deletions
diff --git a/smoketest/configs/ipoe-server b/smoketest/configs/ipoe-server
index 7699dbcb9..a375e91de 100644
--- a/smoketest/configs/ipoe-server
+++ b/smoketest/configs/ipoe-server
@@ -32,6 +32,7 @@ service {
download 1000
upload 500
}
+ vlan-id 100
}
}
interface eth2 {
diff --git a/src/migration-scripts/ipoe-server/0-to-1 b/src/migration-scripts/ipoe-server/0-to-1
index da1f3f761..d768758ba 100755
--- a/src/migration-scripts/ipoe-server/0-to-1
+++ b/src/migration-scripts/ipoe-server/0-to-1
@@ -45,6 +45,12 @@ if config.exists(base + ['authentication', 'interface']):
for interface in config.list_nodes(base + ['authentication', 'interface']):
config.rename(base + ['authentication', 'interface', interface, 'mac-address'], 'mac')
+ mac_base = base + ['authentication', 'interface', interface, 'mac']
+ for mac in config.list_nodes(mac_base):
+ vlan_config = mac_base + [mac, 'vlan-id']
+ if config.exists(vlan_config):
+ config.rename(vlan_config, 'vlan')
+
for interface in config.list_nodes(base + ['interface']):
base_path = base + ['interface', interface]
for vlan in ['vlan-id', 'vlan-range']: