Browse Source

net/mwan3: add ping size option to mwan3track

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

+ 3
- 2
net/mwan3/files/lib/mwan3/mwan3.sh View File

@ -361,7 +361,7 @@ mwan3_delete_iface_ipset_entries()
mwan3_track()
{
local track_ip track_ips reliability count timeout interval down up
local track_ip track_ips reliability count timeout interval down up size
mwan3_list_track_ips()
{
@ -381,8 +381,9 @@ mwan3_track()
config_get interval $1 interval 10
config_get down $1 down 5
config_get up $1 up 5
config_get size $1 size 56
[ -x /usr/sbin/mwan3track ] && /usr/sbin/mwan3track $1 $2 $reliability $count $timeout $interval $down $up $track_ips &
[ -x /usr/sbin/mwan3track ] && /usr/sbin/mwan3track $1 $2 $reliability $count $timeout $interval $down $up $size $track_ips &
fi
}


+ 2
- 2
net/mwan3/files/usr/sbin/mwan3track View File

@ -1,6 +1,6 @@
#!/bin/sh
[ -z "$9" ] && echo "Error: should not be started manually" && exit 0
[ -z "$10" ] && echo "Error: should not be started manually" && exit 0
if [ -e /var/run/mwan3track-$1.pid ] ; then
kill $(cat /var/run/mwan3track-$1.pid) &> /dev/null
@ -17,7 +17,7 @@ lost=0
while true; do
for track_ip in $track_ips; do
ping -I $2 -c $4 -W $5 -q $track_ip &> /dev/null
ping -I $2 -c $4 -W $5 -s $9 -q $track_ip &> /dev/null
if [ $? -eq 0 ]; then
let host_up_count++
else


Loading…
Cancel
Save