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

Use tunnel when available as default route

This commit is contained in:
Ycarus 2018-03-19 16:19:24 +01:00
parent fe1fbe26d4
commit b2696685a7
4 changed files with 60 additions and 17 deletions

View file

@ -31,7 +31,7 @@ _validate_section() {
_launch_tracker() {
case "$1" in
loopback|lan*|if0*|glorytun*|tun*) return;;
loopback|lan*|if0*|tun*) return;;
esac
local interface_type
@ -46,7 +46,7 @@ _launch_tracker() {
config_get multipath "$1" multipath
config_get gateway "$1" gateway
[ -z "$ifname" ] || [ -z "$multipath" ] || [ "$multipath" = "off" ] && return
[ -z "$ifname" ] || [ -z "$multipath" ] || [ "$multipath" = "off" ] && [ "$1" != "glorytun" ] && return
[ -z "$type" ] && type="ping"
procd_open_instance