Commit 96a821e0 authored by Tata's avatar Tata Committed by Andreas Ziegler

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: 's avatarJan-Tarek Butt <tarek@ring0.de>
parent 5161a62a
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment