mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix getting server IP for MPTCP over VPN
This commit is contained in:
parent
a7d41e1d6f
commit
48c5b00085
1 changed files with 7 additions and 1 deletions
|
@ -8,6 +8,10 @@
|
||||||
USE_PROCD=1
|
USE_PROCD=1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_getremoteip() {
|
||||||
|
[ "$(uci -q get openmptcprouter.$1.master)" = "1" ] && remoteip=$(uci -q get openmptcprouter.$1.ip)
|
||||||
|
}
|
||||||
|
|
||||||
mptcp_over_vpn() {
|
mptcp_over_vpn() {
|
||||||
local interface=$1
|
local interface=$1
|
||||||
nbintf=$(($nbintf+1))
|
nbintf=$(($nbintf+1))
|
||||||
|
@ -15,7 +19,9 @@ mptcp_over_vpn() {
|
||||||
nbintfvpn=$(($nbintfvpn+1))
|
nbintfvpn=$(($nbintfvpn+1))
|
||||||
logger -t "MPTCPoverVPN" "Enable MPTCP over VPN for ${interface}"
|
logger -t "MPTCPoverVPN" "Enable MPTCP over VPN for ${interface}"
|
||||||
id=$(uci -q get network.${interface}.metric)
|
id=$(uci -q get network.${interface}.metric)
|
||||||
remoteip=$(uci -q get openmptcprouter.vps.ip)
|
remoteip=""
|
||||||
|
config_load_openmptcprouter
|
||||||
|
config_foreach _getremoteip server
|
||||||
localip=$(ubus call network.interface.$interface status | jsonfilter -e '@["ipv4-address"][0].address' | tr -d "\n")
|
localip=$(ubus call network.interface.$interface status | jsonfilter -e '@["ipv4-address"][0].address' | tr -d "\n")
|
||||||
multipath=$(uci -q get network.${interface}.multipath)
|
multipath=$(uci -q get network.${interface}.multipath)
|
||||||
[ -z "$multipath" ] && multipath="on"
|
[ -z "$multipath" ] && multipath="on"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue