diff --git a/luci-app-mptcp/luasrc/model/cbi/mptcp.lua b/luci-app-mptcp/luasrc/model/cbi/mptcp.lua index 53fba62e8..c4756ad65 100755 --- a/luci-app-mptcp/luasrc/model/cbi/mptcp.lua +++ b/luci-app-mptcp/luasrc/model/cbi/mptcp.lua @@ -60,7 +60,11 @@ end o = s:option(ListValue, "congestion", translate("Congestion Control"),translate("Default is cubic")) local availablecong = sys.exec("sysctl -n net.ipv4.tcp_available_congestion_control | xargs -n1 | sort | xargs") for cong in string.gmatch(availablecong, "[^%s]+") do - o:value(cong, translate(cong)) + if cong == "bbr" and string.match(availablecong, "bbr1") then + o:value(cong, "bbr3") + else + o:value(cong, cong) + end end -- if tonumber(uname.release:sub(1,4)) >= 5.15 then diff --git a/mptcp/files/etc/uci-defaults/mptcp-defaults b/mptcp/files/etc/uci-defaults/mptcp-defaults index f0ae166d0..d0dd63911 100755 --- a/mptcp/files/etc/uci-defaults/mptcp-defaults +++ b/mptcp/files/etc/uci-defaults/mptcp-defaults @@ -4,11 +4,11 @@ if [ "$(uci -q get network.globals.mptcp_path_manager)" = "" ]; then set network.globals.multipath='enable' set network.globals.mptcp_path_manager='fullmesh' set network.globals.mptcp_scheduler='blest' - set network.globals.congestion='bbr2' + set network.globals.congestion='bbr' set network.globals.mptcp_checksum=0 set network.globals.mptcp_debug=0 set network.globals.mptcp_syn_retries=4 - set network.globals.mptcp_subflows=3 + set network.globals.mptcp_subflows=8 set network.globals.mptcp_add_addr_accepted=1 set network.globals.mptcp_add_addr_timeout=120 set network.globals.mptcp_pm_type=0 @@ -18,12 +18,13 @@ if [ "$(uci -q get network.globals.mptcp_path_manager)" = "" ]; then commit network EOF fi -#if [ "$(uci -q get network.globals.congestion)" != "bbr" ]; then -# uci -q batch <<-EOF >/dev/null -# set network.globals.congestion=bbr -# commit network -# EOF -#fi +# BBRv2 is replaced by BBRv3 +if [ "$(uci -q get network.globals.congestion)" = "bbr2" ]; then + uci -q batch <<-EOF >/dev/null + set network.globals.congestion='bbr' + commit network + EOF +fi if [ "$(uci -q get network.globals.mptcp_syn_retries)" = "1" ]; then uci -q batch <<-EOF >/dev/null set network.globals.mptcp_syn_retries=4 @@ -62,7 +63,7 @@ if [ "$(uci -q show network.globals | grep mptcp_fullmesh)" = "" ]; then fi if [ "$(uci -q get network.globals.mptcp_subflows)" = "" ]; then uci -q batch <<-EOF >/dev/null - set network.globals.mptcp_subflows=3 + set network.globals.mptcp_subflows=8 set network.globals.mptcp_add_addr_accepted=1 set network.globals.mptcp_add_addr_timeout=120 commit network