mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-15 03:51:51 +00:00
sync (#556)
This commit is contained in:
commit
43e448a491
2 changed files with 6 additions and 2 deletions
|
@ -1053,11 +1053,15 @@ fi
|
|||
if [ "$(sysctl -qen net.mptcp.mptcp_enabled | tr -d '\n')" = "1" ] || [ "$(sysctl -qen net.mptcp.enabled | tr -d '\n')" = "1" ]; then
|
||||
[ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.multipathvpn)" != "1" ] && [ "$(uci -q get network.globals.mptcp_force_multipath)" != "0" ] && [ "$(uci -q get network.globals.multipath)" = "enable" ] && {
|
||||
if [ "$multipath_status" = "$multipath_config" ] && ([ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.local_ipv4)" != "$OMR_TRACKER_DEVICE_IP" ] || [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.local_ipv6)" != "$OMR_TRACKER_DEVICE_IP6" ]); then
|
||||
if [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.force_link)" != "0" ]; then
|
||||
_log "Reload MPTCP config for $OMR_TRACKER_DEVICE"
|
||||
/etc/init.d/mptcp reload "$OMR_TRACKER_DEVICE"
|
||||
fi
|
||||
_log "Local IP changed for $OMR_TRACKER_DEVICE ($OMR_TRACKER_INTERFACE) force Multipath"
|
||||
multipath "$OMR_TRACKER_DEVICE" "$multipath_config"
|
||||
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.local_ipv4="$OMR_TRACKER_DEVICE_IP"
|
||||
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.local_ipv6="$OMR_TRACKER_DEVICE_IP6"
|
||||
elif [ "$multipath_status" != "$multipath_config" ]; then
|
||||
elif [ "$multipath_status" != "$multipath_config" ] || ([ "$OMR_TRACKER_PREV_STATUS" != "" ] && [ "$OMR_TRACKER_PREV_STATUS" != "$OMR_TRACKER_STATUS" ]); then
|
||||
if [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.force_link)" != "0" ]; then
|
||||
_log "Reload MPTCP config for $OMR_TRACKER_DEVICE"
|
||||
/etc/init.d/mptcp reload "$OMR_TRACKER_DEVICE"
|
||||
|
|
|
@ -255,7 +255,7 @@ if [ -n "$OMR_TRACKER_INTERFACE" ] && { [ "$(uci -q get openmptcprouter.$OMR_TRA
|
|||
# uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.state=$(echo $intfdata | awk -F";" '{print $4}')
|
||||
#else
|
||||
if [ "$proto" != "qmi" ] && [ "$proto" != "modemmanager" ]; then
|
||||
if [ -n "$OMR_TRACKER_DEVICE_GATEWAY" ] && [ -n "$OMR_TRACKER_DEVICE_IP" ] && [ -n "$(curl --interface $OMR_TRACKER_DEVICE_IP -s -m 2 -X GET http://$OMR_TRACKER_DEVICE_GATEWAY/api/webserver/SesTokInfo)" ]; then
|
||||
if [ -n "$OMR_TRACKER_DEVICE_GATEWAY" ] && [ -n "$OMR_TRACKER_DEVICE_IP" ] && [ "$(curl --interface $OMR_TRACKER_DEVICE_IP -s -w %{http_code} -m 2 http://$OMR_TRACKER_DEVICE_GATEWAY/api/webserver/SesTokInfo -o /dev/null)" = "200" ]; then
|
||||
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.manufacturer='huawei'
|
||||
else
|
||||
uci -q delete openmptcprouter.$OMR_TRACKER_INTERFACE.manufacturer
|
||||
|
|
Loading…
Reference in a new issue