1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-14 19:41:51 +00:00

Fix 0 speed for SQM

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-04-13 16:06:10 +02:00
parent 19a4fc8253
commit 5a97ebfff9

View file

@ -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")