gluon-core: only use a bridge for wired meshing when necessary

On most devices, there is only a single LAN interface connected to all LAN
ports, so no bridge is necessary.
This commit is contained in:
Matthias Schiffer 2018-01-24 21:20:30 +01:00
parent 8b44d09963
commit 2950cc3f59
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

View File

@ -14,13 +14,18 @@ local old_proto = uci:get('network', 'mesh_lan', 'proto')
uci:section('network', 'interface', 'mesh_lan', {
ifname = sysconfig.lan_ifname,
type = 'bridge',
igmp_snooping = false,
proto = 'gluon_wired',
index = 4,
legacy = old_proto == 'gluon_mesh',
})
if sysconfig.lan_ifname:match(' ') then
uci:set('network', 'mesh_lan', 'type', 'bridge')
else
uci:delete('network', 'mesh_lan', 'type')
end
local enable = site.mesh_on_lan(false)
local old_auto = uci:get('network', 'mesh_lan', 'auto')
local old_disabled = uci:get('network', 'mesh_lan', 'disabled')