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

Change VPN to use device instead of ifname

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-06-25 19:39:19 +02:00
parent dd16ae03f5
commit 1f15378d56
4 changed files with 6 additions and 5 deletions

View file

@ -13,7 +13,8 @@ interface_multipath_settings() {
mode="$(uci -q get openmptcprouter.$config.multipath)"
}
[ "$mode" = "off" ] || [ "$mode" = "" ] && return 1
config_get ifname "$config" ifname
config_get ifname "$config" device
[ -z "$ifname" ] && config_get ifname "$config" ifname
[ -z "$ifname" ] && ifname=$(ifstatus "$config" | jsonfilter -q -e '@["l3_device"]')
[ -n "$(echo $ifname | grep '@')" ] && ifname=$(ifstatus "$1" | jsonfilter -q -e '@["device"]')
[ -z "$ifname" ] && return 1
@ -46,7 +47,7 @@ start() {
firstport="$(uci -q get mlvpn.general.firstport)"
if [ "$(uci -q get network.omrvpn)" != "${interface_name}" ]; then
uci -q set network.omrvpn.ifname=${interface_name}
uci -q set network.omrvpn.device=${interface_name}
uci -q commit
fi