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

Only change multipath off if no already off

This commit is contained in:
Ycarus 2018-03-30 15:48:31 +02:00
parent d5568cd6c8
commit a64f26620b

View file

@ -61,18 +61,17 @@ default_gw=$(ip route show default | grep -v metric | awk '/default/ {print $3}'
# An interface in error will never be used in MPTCP
if [ "$OMR_TRACKER_STATUS" = "ERROR" ]; then
if [ -d "/sys/class/net/$OMR_TRACKER_DEVICE" ]; then
#[ "$multipath_status" = "off" ] && exit 0
#_log "$OMR_TRACKER_DEVICE switched off"
multipath "$OMR_TRACKER_DEVICE" off
[ "$multipath_status" = "off" ] || {
_log "$OMR_TRACKER_DEVICE switched off"
multipath "$OMR_TRACKER_DEVICE" off
config_load shadowsocks-libev
config_foreach del_ss_route server
}
fi
if [ "$default_gw" = "$OMR_TRACKER_DEVICE_GATEWAY" ] || [ "$default_gw" = "" ]; then
config_load network
config_foreach set_route interface $OMR_TRACKER_INTERFACE
fi
if [ -d "/sys/class/net/$OMR_TRACKER_DEVICE" ]; then
config_load shadowsocks-libev
config_foreach del_ss_route server
fi
exit 0
fi