diff --git a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua index 54c026d2f..379f4da7b 100644 --- a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua +++ b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua @@ -84,12 +84,18 @@ function wizard_add() ucic:set("sqm",intf,"download",downloadspeed) ucic:set("sqm",intf,"upload",uploadspeed) ucic:set("sqm",intf,"enabled","1") + ucic:set("qos",intf,"download",downloadspeed) + ucic:set("qos",intf,"upload",uploadspeed) + ucic:set("qos",intf,"enabled","1") else ucic:set("sqm",intf,"enabled","0") + ucic:set("qos",intf,"enabled","0") end end ucic:save("sqm") ucic:commit("sqm") + ucic:save("qos") + ucic:commit("qos") ucic:save("network") ucic:commit("network") @@ -97,7 +103,7 @@ function wizard_add() local disable_ipv6 = "0" local enable_ipv6 = luci.http.formvalue("enableipv6") or "1" if enable_ipv6 == "0" then - disable_pv6 = "1" + disable_ipv6 = "1" end set_ipv6_state(disable_ipv6) @@ -576,7 +582,7 @@ function interfaces_status() uci:foreach("network", "interface", function (section) local interface = section[".name"] local net = ntm:get_network(interface) - local ipaddr = net:ipaddr() + local ipaddr = net:ipaddr() or "" local gateway = section["gateway"] or "" local multipath = section["multipath"] local enabled = section["auto"] diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm index a94ca706e..e048c17f7 100644 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm @@ -167,31 +167,36 @@ <% - if nixio.fs.access("/etc/init.d/sqm") then + local download = "" + local upload = "" + if nixio.fs.access("/etc/init.d/sqm") then + download = uci:get("sqm",ifname,"download") + upload = uci:get("sqm",ifname,"upload") + else + download = uci:get("qos",ifname,"download") + upload = uci:get("qos",ifname,"upload") + end %>