net/mwan3: mwan3track skip track ips if realibility is accomplished
If enough tracking ip are pinged skip the reset. They are not needed anymore to mark the interface as up. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
parent
cabb835ed4
commit
ec5542ab2b
1 changed files with 17 additions and 13 deletions
|
@ -92,6 +92,7 @@ main() {
|
||||||
sleep_time=$interval
|
sleep_time=$interval
|
||||||
|
|
||||||
for track_ip in $track_ips; do
|
for track_ip in $track_ips; do
|
||||||
|
if [ $host_up_count -lt $reliability ]; then
|
||||||
case "$track_method" in
|
case "$track_method" in
|
||||||
ping)
|
ping)
|
||||||
ping -I $DEVICE -c $count -W $timeout -s $size -q $track_ip &> /dev/null ;;
|
ping -I $DEVICE -c $count -W $timeout -s $size -q $track_ip &> /dev/null ;;
|
||||||
|
@ -107,6 +108,9 @@ main() {
|
||||||
let lost++
|
let lost++
|
||||||
echo "down" > /var/run/mwan3track/$1/TRACK_${track_ip}
|
echo "down" > /var/run/mwan3track/$1/TRACK_${track_ip}
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "skipped" > /var/run/mwan3track/$1/TRACK_${track_ip}
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ $host_up_count -lt $reliability ]; then
|
if [ $host_up_count -lt $reliability ]; then
|
||||||
|
|
Loading…
Reference in a new issue