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

Remove handover when updating config

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-05-05 09:55:13 +02:00
parent c468d149d7
commit 7e5b91842b

View file

@ -42,6 +42,15 @@ _setup_macvlan_update() {
EOF EOF
} }
_setup_mptcp_handover_to_on() {
if [ "$(uci -q get network.$1.multipath)" = "handover" ]; then
uci -q set network.$1.multipath=on
fi
if [ "$(uci -q get openmptcprouter.$1.multipath)" = "handover" ]; then
uci -q set openmptcprouter.$1.multipath=on
fi
}
_setup_multipath_off() { _setup_multipath_off() {
uci -q get "network.$1.multipath" >/dev/null && return uci -q get "network.$1.multipath" >/dev/null && return
uci -q set "network.$1.multipath=off" uci -q set "network.$1.multipath=off"
@ -64,6 +73,7 @@ _setup_wan_interface() {
config_load network config_load network
config_foreach _setup_macvlan_update interface config_foreach _setup_macvlan_update interface
config_foreach _setup_mptcp_handover_to_on interface
if [ "$(uci -q show network.lan | grep multipath)" != "" ]; then if [ "$(uci -q show network.lan | grep multipath)" != "" ]; then
exit 0 exit 0