mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Use speed only for glorytun or if no values set for SQM/QoS
This commit is contained in:
parent
67e6cbd987
commit
9db2c461dc
2 changed files with 41 additions and 19 deletions
|
@ -215,19 +215,25 @@ function wizard_add()
|
|||
end
|
||||
|
||||
if downloadspeed ~= "0" and uploadspeed ~= "0" then
|
||||
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,"download","0")
|
||||
ucic:set("sqm",intf,"upload","0")
|
||||
ucic:set("sqm",intf,"enabled","0")
|
||||
ucic:set("qos",intf,"download","0")
|
||||
ucic:set("qos",intf,"upload","0")
|
||||
ucic:set("qos",intf,"enabled","0")
|
||||
ucic:set("network",intf,"downloadspeed",downloadspeed)
|
||||
ucic:set("network",intf,"uploadspeed",uploadspeed)
|
||||
if ucic:get("sqm",intf,"download") == "" then
|
||||
ucic:set("sqm",intf,"download",downloadspeed)
|
||||
ucic:set("sqm",intf,"upload",uploadspeed)
|
||||
--ucic:set("sqm",intf,"enabled","1")
|
||||
end
|
||||
if ucic:get("qos",intf,"download") == "" then
|
||||
ucic:set("qos",intf,"download",downloadspeed)
|
||||
ucic:set("qos",intf,"upload",uploadspeed)
|
||||
--ucic:set("qos",intf,"enabled","1")
|
||||
end
|
||||
--else
|
||||
-- ucic:set("sqm",intf,"download","0")
|
||||
-- ucic:set("sqm",intf,"upload","0")
|
||||
-- ucic:set("sqm",intf,"enabled","0")
|
||||
-- ucic:set("qos",intf,"download","0")
|
||||
-- ucic:set("qos",intf,"upload","0")
|
||||
-- ucic:set("qos",intf,"enabled","0")
|
||||
end
|
||||
end
|
||||
ucic:save("sqm")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue