mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-14 19:41:51 +00:00
Fix 6in4 support for MLVPN and OpenVPN
This commit is contained in:
parent
f536748542
commit
fa085dcdca
1 changed files with 7 additions and 1 deletions
|
@ -9,7 +9,13 @@ service_triggers() {
|
|||
}
|
||||
|
||||
reload_service() {
|
||||
iface=$(uci -q get glorytun.vpn.dev)
|
||||
if [ "$(uci -q get glorytun.vpn.enable)" = "1" ]; then
|
||||
iface=$(uci -q get glorytun.vpn.dev)
|
||||
elif [ "$(uci -q get mlvpn.general.enable)" = "1" ]; then
|
||||
iface=$(uci -q get mlvpn.general.interface_name)
|
||||
elif [ "$(uci -q get openvpn.omr.enabled)" = "1" ]; then
|
||||
iface=$(uci -q get openvpn.omr.dev)
|
||||
fi
|
||||
addr=$(ubus call network.interface.omrvpn status | jsonfilter -e '@["ipv4-address"][0].address' | tr -d "\n")
|
||||
[ -z "$addr" ] && [ -n "$iface" ] && addr=$(ip -4 addr show dev $iface | grep inet | awk '{print $2}' | cut -d/ -f1 | tr -d "\n")
|
||||
peer=$(ubus call network.interface.omrvpn status | jsonfilter -e '@.route[0].nexthop' | tr -d "\n")
|
||||
|
|
Loading…
Reference in a new issue