local rip = uciout:get("qmp","networks","bmx6_ipv4_address")
if rip == nil or #rip < 7 then
rip = uciout:get("bmx6","general","tun4Address")
if rip == nil or #rip < 7 then
if rip == nil or #rip < 7 then
rip = ""
end
end
end
nodeip_roaming.default=rip
nodeip_roaming.datatype="ip4prefix"
...
...
@@ -157,38 +157,39 @@ for i,v in ipairs(devices.eth) do
nodedevs_eth[i] = {v,tmp}
end
-- MeshAll option for wired devices
meshall = m:field(Flag, "_meshall", translate("Use mesh in all wired devices"),translate("If this option is enabled, all the node'swirednetworkdeviceswillbeusedformeshing(recommended)"))
-- Check if the device is adhoc_ap mode, then Mode=AP MeshAll=1
uciout:foreach("qmp","wireless", function (s)
if s.device == v then
if s.mode ~= nil then
tmp.default = s.mode
end
end)
-- If it is not adhoc_ap it is only mesh
if tmp.default == "" then tmp.default = "Mesh" end
end
end
end)
nodedevs_wifi[i] = {v,tmp}
end
meshall = m:field(Flag, "_meshall", translate("Use mesh in all devices"),translate("If this option is enabled, all the node'snetworkdeviceswillbeusedformeshing(recommended)"))
meshall.default = "1"
function netmode.write(self, section, value)
local name = nodename:formvalue(section)
...
...
@@ -196,7 +197,7 @@ function netmode.write(self, section, value)
local nodeip = nodeip:formvalue(section)
local nodemask = nodemask:formvalue(section)
local nodeip_roaming = nodeip_roaming:formvalue(section)
if mode == "community" then
uciout:set("qmp","roaming","ignore","1")
uciout:set("qmp","networks","publish_lan","1")
...
...
@@ -253,12 +254,7 @@ function netmode.write(self, section, value)