From a878729b227cf5a9568dcb95cb0ac7de2142f27a Mon Sep 17 00:00:00 2001 From: Ycarus Date: Thu, 15 Feb 2018 09:33:27 +0100 Subject: [PATCH] Fix failover --- .../files/usr/share/omr/post-tracking.d/post-tracking | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking index 78bc28d9a..07c9c4a48 100755 --- a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking +++ b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking @@ -5,9 +5,9 @@ set_route() { local multipath_config interface_gw interface_if INTERFACE=$1 multipath_config=$(uci -q get "network.$INTERFACE.multipath" || echo "off") - #multipath_current_config=$(multipath $INTERFACE | grep deactivated) - #if [ "$multipath_config" != "off" ] && [ "$SETROUTE" != true ] && [ "$multipath_current_config" = "" ]; then - if [ "$multipath_config" != "off" ] && [ "$SETROUTE" != true ]; then + multipath_current_config=$(multipath $INTERFACE | grep deactivated) + if [ "$multipath_config" != "off" ] && [ "$SETROUTE" != true ] && [ "$multipath_current_config" = "" ]; then + #if [ "$multipath_config" != "off" ] && [ "$SETROUTE" != true ]; then interface_gw=$(uci -q get "network.$INTERFACE.gateway") interface_if=$(uci -q get "network.$INTERFACE.ifname") ip route replace default scope global nexthop via $interface_gw dev $interface_if && SETROUTE=true @@ -28,8 +28,8 @@ current_interface_gw=$(uci -q get "network.$OMR_TRACKER_INTERFACE.gateway") # An interface in error will never be used in MPTCP if [ "$OMR_TRACKER_STATUS" = "ERROR" ]; then - [ "$multipath_status" = "off" ] && exit 0 - _log "$OMR_TRACKER_DEVICE switched off" + #[ "$multipath_status" = "off" ] && exit 0 + #_log "$OMR_TRACKER_DEVICE switched off" multipath "$OMR_TRACKER_DEVICE" off if [ "$default_gw" = "$current_interface_gw" ] || [ "$default_gw" = "" ]; then config_load network