mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix MPTCP mode changes
This commit is contained in:
parent
9f4251b59b
commit
b6bc58db14
1 changed files with 4 additions and 5 deletions
|
@ -410,15 +410,14 @@ interface_multipath_settings() {
|
|||
fi
|
||||
|
||||
if [ "$(uci -q get openmptcprouter.settings.force_multipath)" != "0" ]; then
|
||||
multipath "$iface" "off"
|
||||
if ([ "$mode" = "master" ] || [ "$mode" = "on" ]) && [ -z "$(multipath $iface | grep default)" ]; then
|
||||
logger -t "MPTCP" "Set $iface to $mode"
|
||||
logger -t "MPTCP" "Set $iface to $mode from $(multipath $iface)"
|
||||
multipath "$iface" "on"
|
||||
elif [ "$mode" = "off" ] && [ -z "$(multipath $iface | grep deactivated)" ]; then
|
||||
logger -t "MPTCP" "Set $iface to $mode"
|
||||
elif ([ "$mode" = "off" ] || [ -z "$mode" ]) && [ -z "$(multipath $iface | grep deactivated)" ]; then
|
||||
logger -t "MPTCP" "Set $iface to $mode from $(multipath $iface)"
|
||||
multipath "$iface" "$mode"
|
||||
elif [ "$mode" = "backup" ] && [ -z "$(multipath $iface | grep backup)" ]; then
|
||||
logger -t "MPTCP" "Set $iface to $mode"
|
||||
logger -t "MPTCP" "Set $iface to $mode from $(multipath $iface)"
|
||||
multipath "$iface" "$mode"
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue