diff --git a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua index 21dd0095c..8f78a6bc9 100644 --- a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua +++ b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua @@ -364,6 +364,7 @@ function wizard_add() ucic:set("sqm",intf,"download",math.ceil(downloadspeed*95/100)) ucic:set("qos",intf,"download",math.ceil(downloadspeed*95/100)) else + ucic:delete("network",intf,"downloadspeed") ucic:set("sqm",intf,"download","0") ucic:set("qos",intf,"download","0") end @@ -372,13 +373,10 @@ function wizard_add() ucic:set("sqm",intf,"upload",math.ceil(uploadspeed*95/100)) ucic:set("qos",intf,"upload",math.ceil(uploadspeed*95/100)) else + ucic:delete("network",intf,"uploadspeed") ucic:set("sqm",intf,"upload","0") ucic:set("qos",intf,"upload","0") end - if downloadspeed ~= "0" and downloadspeed ~= "" and uploadspeed ~= "0" and uploadspeed ~= "" then - ucic:set("sqm",intf,"enabled","0") - ucic:set("qos",intf,"enabled","0") - end if sqmenabled == "1" then ucic:set("sqm",intf,"iqdisc_opts","autorate-ingress nat dual-dsthost")