mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-12 18:41:51 +00:00
Add MPTCP version support to use VPS with 5.4 kernel when router use 5.15
This commit is contained in:
parent
1243f58e21
commit
4a3bde8e09
1 changed files with 5 additions and 2 deletions
|
@ -728,6 +728,7 @@ _set_mptcp_vps() {
|
|||
scheduler_current="$(echo "$vps_config" | jsonfilter -q -e '@.mptcp.scheduler')"
|
||||
syn_retries_current="$(echo "$vps_config" | jsonfilter -q -e '@.mptcp.syn_retries')"
|
||||
congestion_control_current="$(echo "$vps_config" | jsonfilter -q -e '@.network.congestion_control')"
|
||||
mptcp_version_current="$(echo "$vps_config" | jsonfilter -q -e '@.mptcp.version')"
|
||||
mptcp_enabled="$(uci -q get network.globals.multipath)"
|
||||
if [ "$mptcp_enabled" = "disable" ]; then
|
||||
mptcp_enabled="0"
|
||||
|
@ -739,9 +740,11 @@ _set_mptcp_vps() {
|
|||
scheduler="$(uci -q get network.globals.mptcp_scheduler)"
|
||||
syn_retries="$(uci -q get network.globals.mptcp_syn_retries)"
|
||||
congestion="$(uci -q get network.globals.congestion)"
|
||||
mptcp_version="0"
|
||||
[ ! -f /proc/sys/net/mptcp/mptcp_enabled ] && mptcp_version="1"
|
||||
[ -z "$congestion" ] && congestion="bbr"
|
||||
if [ "$mptcp_enabled_current" != "$mptcp_enabled" ] || [ "$checksum_current" != "$checksum" ] || ([ "$path_manager_current" != "" ] && [ "$path_manager_current" != "$path_manager" ]) || ([ "$scheduler_current" != "" ] && [ "$scheduler_current" != "$scheduler" ]) || ([ "$syn_retries_current" != "" ] && [ "$syn_retries_current" != "$syn_retries" ]) || [ "$congestion_control_current" != "$congestion" ]; then
|
||||
settings='{"enabled" : "'$mptcp_enabled'", "checksum": "'$checksum'","path_manager": "'$path_manager'","scheduler": "'$scheduler'","syn_retries": "'$syn_retries'","congestion_control": "'$congestion'"}'
|
||||
if [ "$mptcp_enabled_current" != "$mptcp_enabled" ] || [ "$checksum_current" != "$checksum" ] || ([ "$path_manager_current" != "" ] && [ "$path_manager_current" != "$path_manager" ]) || ([ "$scheduler_current" != "" ] && [ "$scheduler_current" != "$scheduler" ]) || ([ "$syn_retries_current" != "" ] && [ "$syn_retries_current" != "$syn_retries" ]) || [ "$congestion_control_current" != "$congestion" ] || [ "$mptcp_version_current" != "$mptcp_version" ]; then
|
||||
settings='{"enabled" : "'$mptcp_enabled'", "checksum": "'$checksum'","path_manager": "'$path_manager'","scheduler": "'$scheduler'","syn_retries": "'$syn_retries'","congestion_control": "'$congestion'","version": "'$mptcp_version'"}'
|
||||
echo $(_set_json "mptcp" "$settings")
|
||||
else
|
||||
echo 1
|
||||
|
|
Loading…
Reference in a new issue