mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Not possible to bind with 3g
This commit is contained in:
parent
a19dac4ee7
commit
e99391f888
1 changed files with 27 additions and 12 deletions
|
@ -93,6 +93,20 @@ _ping() {
|
|||
local host=$1
|
||||
local device=$2
|
||||
local localip=$3
|
||||
if [ "$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)" = "3g" ]; then
|
||||
ret=$(ping -I "${device}" \
|
||||
-w "$OMR_TRACKER_TIMEOUT" \
|
||||
-c 1 \
|
||||
-q \
|
||||
"${host}"
|
||||
) && echo "$ret" | grep -sq " 0% packet loss" && {
|
||||
if [ "$localip" = "yes" ]; then
|
||||
OMR_TRACKER_LATENCY=$(echo "$ret" | cut -d "/" -s -f5 | cut -d "." -f1)
|
||||
_update_rto "$OMR_TRACKER_LATENCY"
|
||||
fi
|
||||
return
|
||||
}
|
||||
else
|
||||
ret=$(ping -B -I "${device}" \
|
||||
-w "$OMR_TRACKER_TIMEOUT" \
|
||||
-c 1 \
|
||||
|
@ -105,6 +119,7 @@ _ping() {
|
|||
fi
|
||||
return
|
||||
}
|
||||
fi
|
||||
false
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue