diff --git a/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/wizard/0300-mesh-vpn.lua b/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/wizard/0300-mesh-vpn.lua index 0fd6432b..db753f76 100644 --- a/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/wizard/0300-mesh-vpn.lua +++ b/package/gluon-config-mode-mesh-vpn/luasrc/lib/gluon/config-mode/wizard/0300-mesh-vpn.lua @@ -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)