gluon-config-mode-mesh-vpn: 0300-mesh-vpn.lua fix limit_ingress default value (#1682)
in case of default disabled simple-tc for tunneldigger Signed-off-by: Jan-Tarek Butt <tarek@ring0.de>
This commit is contained in:
parent
e13a614420
commit
d4c066a0f8
@ -48,10 +48,13 @@ return function(form, uci)
|
||||
|
||||
o = s:option(Value, "limit_ingress", pkg_i18n.translate("Downstream (kbit/s)"))
|
||||
o:depends(limit, true)
|
||||
o.default = uci:get("simple-tc", "mesh_vpn", "limit_ingress")
|
||||
if has_tunneldigger then
|
||||
o.default = uci:get("tunneldigger", "mesh_vpn", "limit_bw_down")
|
||||
else
|
||||
o.default = uci:get("simple-tc", "mesh_vpn", "limit_ingress")
|
||||
-- Check if limit_bw_down exists. If not, take the value from limit_ingress
|
||||
local limit_bw_down = uci:get("tunneldigger", "mesh_vpn", "limit_bw_down")
|
||||
if limit_bw_down ~= nil then
|
||||
o.default = limit_bw_down
|
||||
end
|
||||
end
|
||||
o.datatype = "uinteger"
|
||||
function o:write(data)
|
||||
|
Loading…
Reference in New Issue
Block a user