Skip to content
Snippets Groups Projects
Unverified Commit fa0e2d06 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

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'.
parent 5e44f7cd
No related branches found
No related tags found
No related merge requests found
......@@ -45,6 +45,16 @@ if platform.match('ar71xx', 'generic', {
'unifiac-pro',
}) then
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
if wan_ifname and lan_ifname then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment