1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-13 11:01:50 +00:00

Let enable SQM even if no speed defined

This commit is contained in:
Ycarus (Yannick Chabanois) 2019-08-15 19:11:18 +02:00
parent 84e6dcb3e0
commit c9327c9214

View file

@ -227,18 +227,8 @@ function wizard_add()
ucic:set("network",intf,"uploadspeed",uploadspeed) ucic:set("network",intf,"uploadspeed",uploadspeed)
ucic:set("sqm",intf,"download",math.ceil(downloadspeed*95/100)) ucic:set("sqm",intf,"download",math.ceil(downloadspeed*95/100))
ucic:set("sqm",intf,"upload",math.ceil(uploadspeed*95/100)) ucic:set("sqm",intf,"upload",math.ceil(uploadspeed*95/100))
if sqmenabled == "1" then
ucic:set("sqm",intf,"enabled","1")
else
ucic:set("sqm",intf,"enabled","0")
end
ucic:set("qos",intf,"download",math.ceil(downloadspeed*95/100)) ucic:set("qos",intf,"download",math.ceil(downloadspeed*95/100))
ucic:set("qos",intf,"upload",math.ceil(uploadspeed*95/100)) ucic:set("qos",intf,"upload",math.ceil(uploadspeed*95/100))
if sqmenabled == "1" then
ucic:set("qos",intf,"enabled","1")
else
ucic:set("qos",intf,"enabled","0")
end
else else
ucic:set("sqm",intf,"download","0") ucic:set("sqm",intf,"download","0")
ucic:set("sqm",intf,"upload","0") ucic:set("sqm",intf,"upload","0")
@ -247,6 +237,13 @@ function wizard_add()
ucic:set("qos",intf,"upload","0") ucic:set("qos",intf,"upload","0")
ucic:set("qos",intf,"enabled","0") ucic:set("qos",intf,"enabled","0")
end end
if sqmenabled == "1" then
ucic:set("sqm",intf,"enabled","1")
ucic:set("qos",intf,"enabled","1")
else
ucic:set("sqm",intf,"enabled","0")
ucic:set("qos",intf,"enabled","0")
end
end end
-- Disable multipath on LAN, VPN and loopback -- Disable multipath on LAN, VPN and loopback
ucic:set("network","loopback","multipath","off") ucic:set("network","loopback","multipath","off")