gluon-core: lantiq: use WAN interface from switch0 configuration
On lantiq, the default WAN ifname is 'dsl0' even on devices that have a separate WAN port. At least on devices using swconfig we can override this with the switch port labelled as 'wan'.
This commit is contained in:
parent
5e44f7cdde
commit
fa0e2d06b6
@ -45,6 +45,16 @@ if platform.match('ar71xx', 'generic', {
|
|||||||
'unifiac-pro',
|
'unifiac-pro',
|
||||||
}) then
|
}) then
|
||||||
lan_ifname, wan_ifname = wan_ifname, lan_ifname
|
lan_ifname, wan_ifname = wan_ifname, lan_ifname
|
||||||
|
elseif platform.match('lantiq') then
|
||||||
|
local switch_data = board_data.switch or {}
|
||||||
|
local switch0_data = switch_data.switch0 or {}
|
||||||
|
local roles_data = switch0_data.roles or {}
|
||||||
|
for _, role_data in ipairs(roles_data) do
|
||||||
|
if role_data.role == 'wan' then
|
||||||
|
wan_ifname = iface_exists(role_data.device)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if wan_ifname and lan_ifname then
|
if wan_ifname and lan_ifname then
|
||||||
|
Loading…
Reference in New Issue
Block a user