diff --git a/package/gluon-luci-portconfig/files/usr/lib/lua/luci/model/cbi/admin/portconfig.lua b/package/gluon-luci-portconfig/files/usr/lib/lua/luci/model/cbi/admin/portconfig.lua index 8166539c..5f6cc77f 100644 --- a/package/gluon-luci-portconfig/files/usr/lib/lua/luci/model/cbi/admin/portconfig.lua +++ b/package/gluon-luci-portconfig/files/usr/lib/lua/luci/model/cbi/admin/portconfig.lua @@ -122,9 +122,9 @@ function f.handle(self, state, data) uci:set("network", "mesh_lan", "auto", data.mesh_lan) if data.mesh_lan == '1' then - uci:set("network", "client", "ifname", "bat0") + uci:remove_from_set("network", "client", "ifname", sysconfig.lan_ifname) else - uci:set("network", "client", "ifname", sysconfig.lan_ifname .. " bat0") + uci:add_to_set("network", "client", "ifname", sysconfig.lan_ifname) end end diff --git a/package/gluon-mesh-batman-adv-core/files/lib/gluon/upgrade/310-gluon-mesh-batman-adv-core-mesh b/package/gluon-mesh-batman-adv-core/files/lib/gluon/upgrade/310-gluon-mesh-batman-adv-core-mesh index 892ef102..b35aa010 100755 --- a/package/gluon-mesh-batman-adv-core/files/lib/gluon/upgrade/310-gluon-mesh-batman-adv-core-mesh +++ b/package/gluon-mesh-batman-adv-core/files/lib/gluon/upgrade/310-gluon-mesh-batman-adv-core-mesh @@ -20,22 +20,28 @@ uci:commit('batman-adv') if not uci:get('network', 'client') then - local ifname + uci:section('network', 'interface', 'client', + { + type = 'bridge', + proto = 'dhcpv6', + reqprefix = 'no', + } + ) + + uci:add_to_set('network', 'client', 'ifname', 'bat0') if sysconfig.lan_ifname and not site.mesh_on_lan then - ifname = sysconfig.lan_ifname .. ' bat0' - else - ifname = 'bat0' + uci:add_to_set('network', 'client', 'ifname', sysconfig.lan_ifname) end +end - uci:section('network', 'interface', 'client', - { - ifname = ifname, - type = 'bridge', - proto = 'dhcpv6', - reqprefix = 'no', - } - ) +local ifname = uci:get('network', 'client', 'ifname') + +if type(ifname) == 'string' then + uci:delete('network', 'client', 'ifname') + for x in ifname:gmatch("[^%s]+") do + uci:add_to_set('network', 'client', 'ifname', x) + end end uci:set('network', 'client', 'igmp_snooping', 0) diff --git a/package/gluon-mesh-batman-adv-core/files/lib/gluon/upgrade/340-gluon-mesh-batman-adv-core-mesh-on-lan b/package/gluon-mesh-batman-adv-core/files/lib/gluon/upgrade/340-gluon-mesh-batman-adv-core-mesh-on-lan index d9831bfc..c3deea29 100755 --- a/package/gluon-mesh-batman-adv-core/files/lib/gluon/upgrade/340-gluon-mesh-batman-adv-core-mesh-on-lan +++ b/package/gluon-mesh-batman-adv-core/files/lib/gluon/upgrade/340-gluon-mesh-batman-adv-core-mesh-on-lan @@ -11,9 +11,9 @@ if sysconfig.lan_ifname and not uci:get('network', 'mesh_lan') then local enable = site.mesh_on_lan if enable then - local interfaces = uci:get('network', 'client', 'ifname') + local interfaces = uci:get_list('network', 'client', 'ifname') - if interfaces and lutil.contains(interfaces:split(' '), sysconfig.lan_ifname) then + if interfaces and lutil.contains(interfaces, sysconfig.lan_ifname) then enable = false end end