Skip to content
Snippets Groups Projects
Unverified Commit 5d9532ae authored by Matthias Schiffer's avatar Matthias Schiffer Committed by GitHub
Browse files

Merge pull request #3480 from blocktrron/pr-dsa-conduit

gluon-core: use single conduit interface for DSA topology
parents d8145f83 3c0186c6
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/lua
local uci = require('simple-uci').cursor()
local platform = require 'gluon.platform'
-- This is a workaround to result in a configuration where all ports
-- on the DSA switch are connected to the same CPU interface.
--
-- See Gluon issue #3479 for details.
-- https://github.com/freifunk-gluon/gluon/issues/3479
if not platform.match('ipq806x', 'generic', {
'netgear,r7800',
'tplink,c2600',
}) then
return
end
local ports = {
'lan1',
'lan2',
'lan3',
'lan4',
'wan',
}
local cpu_conduit = 'eth0'
for _, port in ipairs(ports) do
local section_name = 'port_' .. port
uci:section('network', 'device', section_name, {
name = port,
conduit = cpu_conduit,
})
end
uci:save('network')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment