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:
parent
8b44d09963
commit
2950cc3f59
@ -14,13 +14,18 @@ local old_proto = uci:get('network', 'mesh_lan', 'proto')
|
|||||||
|
|
||||||
uci:section('network', 'interface', 'mesh_lan', {
|
uci:section('network', 'interface', 'mesh_lan', {
|
||||||
ifname = sysconfig.lan_ifname,
|
ifname = sysconfig.lan_ifname,
|
||||||
type = 'bridge',
|
|
||||||
igmp_snooping = false,
|
igmp_snooping = false,
|
||||||
proto = 'gluon_wired',
|
proto = 'gluon_wired',
|
||||||
index = 4,
|
index = 4,
|
||||||
legacy = old_proto == 'gluon_mesh',
|
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 enable = site.mesh_on_lan(false)
|
||||||
local old_auto = uci:get('network', 'mesh_lan', 'auto')
|
local old_auto = uci:get('network', 'mesh_lan', 'auto')
|
||||||
local old_disabled = uci:get('network', 'mesh_lan', 'disabled')
|
local old_disabled = uci:get('network', 'mesh_lan', 'disabled')
|
||||||
|
Loading…
Reference in New Issue
Block a user