Skip to content
Snippets Groups Projects
Commit 3c0186c6 authored by David Bauer's avatar David Bauer
Browse files

gluon-core: use single conduit interface for DSA topology

As explained in issue #3479, asisgning the same role over interfaces
using different conduit interfaces can lead the network setup rendered
in an dysfunctional state.

As a stop-gap solution, use the same conduit interface for all devices
with the problematic topology.

Link: https://github.com/freifunk-gluon/gluon/issues/3479



Signed-off-by: default avatarDavid Bauer <mail@david-bauer.net>
parent fef15507
Branches
Tags
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