gluon-core: use copy of "WAN" role list for "single" default (#2478)

Instead of using roles.wan directly as the default for roles.single,
create a copy of the table, so subsequent modifications of roles.single
don't affect roles.wan as well.

Fixes migration of Mesh-on-WAN status when no default for "single"
interfaces is set in site.conf.
This commit is contained in:
Matthias Schiffer 2022-04-17 20:46:53 +02:00 committed by GitHub
parent 588502cff1
commit a8d25670ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,7 @@ local roles = {
lan = site.interfaces.lan.default_roles({'client'}), lan = site.interfaces.lan.default_roles({'client'}),
wan = site.interfaces.wan.default_roles({'uplink'}), wan = site.interfaces.wan.default_roles({'uplink'}),
} }
roles.single = site.interfaces.single.default_roles(roles.wan) roles.single = site.interfaces.single.default_roles({unpack(roles.wan)})
-- Migration of Mesh-on-WAN/LAN setting from Gluon 2021.1 and older (to be removed in 2024) -- Migration of Mesh-on-WAN/LAN setting from Gluon 2021.1 and older (to be removed in 2024)
-- --