Browse Source

net/mwan3: add option keep_failure_interval on failure

Add new boolean interface config param to keep ping failure interval during
interface failure state.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
lilik-openwrt-22.03
Florian Eckert 8 years ago
parent
commit
a7a2464d9e
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      net/mwan3/files/usr/sbin/mwan3track

+ 5
- 0
net/mwan3/files/usr/sbin/mwan3track View File

@ -51,6 +51,7 @@ validate_track_method() {
main() {
local reliability count timeout interval failure_interval
local recovery_interval down up size
local keep_failure_interval
[ -z "$3" ] && echo "Error: should not be started manually" && exit 0
@ -74,6 +75,7 @@ main() {
config_get up $1 up 5
config_get size $1 size 56
config_get failure_interval $1 failure_interval $interval
config_get_bool keep_failure_interval $1 keep_failure_interval 0
config_get recovery_interval $1 recovery_interval $interval
local score=$(($down+$up))
@ -111,6 +113,9 @@ main() {
if [ $score -lt $up ]; then
score=0
[ ${keep_failure_interval} -eq 1 ] && {
sleep_time=$failure_interval
}
else
sleep_time=$failure_interval
fi


Loading…
Cancel
Save