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:
parent
bca465d3f8
commit
cccf917c16
1 changed files with 2 additions and 1 deletions
|
@ -102,7 +102,8 @@ fi
|
||||||
multipath_config=$(uci -q get "network.$OMR_TRACKER_INTERFACE.multipath" || echo "off")
|
multipath_config=$(uci -q get "network.$OMR_TRACKER_INTERFACE.multipath" || echo "off")
|
||||||
if [ "$multipath_config" = "master" ]; then
|
if [ "$multipath_config" = "master" ]; then
|
||||||
if [ "$default_gw" != "$OMR_TRACKER_DEVICE_GATEWAY" ] || [ "$default_gw" = "" ]; 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"
|
_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
|
ip route replace default scope global nexthop via $OMR_TRACKER_DEVICE_GATEWAY dev $OMR_TRACKER_DEVICE
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue