1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-13 11:01:50 +00:00

Fix tracking support for mlvpn

This commit is contained in:
Ycarus 2018-06-08 14:52:58 +02:00
parent bca465d3f8
commit cccf917c16

View file

@ -102,7 +102,8 @@ fi
multipath_config=$(uci -q get "network.$OMR_TRACKER_INTERFACE.multipath" || echo "off")
if [ "$multipath_config" = "master" ]; then
if [ "$default_gw" != "$OMR_TRACKER_DEVICE_GATEWAY" ] || [ "$default_gw" = "" ]; then
if [ "$(ip route show default | grep -v metric | awk '/default/ {print $5}' | grep tun)" = "" ]; then
omrvpn_intf=$(uci -q get "network.omrvpn.ifname" || echo "tun")
if [ "$(ip route show default | grep -v metric | awk '/default/ {print $5}' | grep $omrvpn_intf)" = "" ]; then
_log "Master up : Replace default route by $current_interface_gw dev $OMR_TRACKER_DEVICE"
ip route replace default scope global nexthop via $OMR_TRACKER_DEVICE_GATEWAY dev $OMR_TRACKER_DEVICE
else