From 6d44a7679a92717126f1da4b274d91322c7c56b7 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Wed, 15 Mar 2017 14:14:35 +0100 Subject: [PATCH] net/mwan3: add ping size option to mwan3track Signed-off-by: Florian Eckert --- net/mwan3/files/lib/mwan3/mwan3.sh | 5 +++-- net/mwan3/files/usr/sbin/mwan3track | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/net/mwan3/files/lib/mwan3/mwan3.sh b/net/mwan3/files/lib/mwan3/mwan3.sh index a633bedd59..0d139be043 100644 --- a/net/mwan3/files/lib/mwan3/mwan3.sh +++ b/net/mwan3/files/lib/mwan3/mwan3.sh @@ -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 } diff --git a/net/mwan3/files/usr/sbin/mwan3track b/net/mwan3/files/usr/sbin/mwan3track index 35f97fe0d5..ca541714cc 100755 --- a/net/mwan3/files/usr/sbin/mwan3track +++ b/net/mwan3/files/usr/sbin/mwan3track @@ -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 -- 2.30.2