1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Merge pull request #114 from Ysurac/develop

sync
This commit is contained in:
suyuan 2021-04-14 00:39:22 +08:00 committed by GitHub
commit 3000d34656
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 12 deletions

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

View file

@ -121,6 +121,13 @@ if [ "$(uci -q get openmptcprouter.settings.disableintfrename)" = "" ]; then
EOF
fi
if [ "$(uci -q get openmptcprouter.settings.tracebox)" = "" ]; then
uci -q batch <<-EOF >/dev/null
set openmptcprouter.settings.tracebox='0'
commit openmptcprouter
EOF
fi
sed -i 's/net.ipv4.tcp_retries2=3$/net.ipv4.tcp_retries2=15/' /etc/sysctl.d/zzz_openmptcprouter.conf
exit 0