mwan3: use ping -I for ipv6 after tunnel kernel fix
authorAaron Goodman <aaronjg@stanford.edu>
Tue, 22 Dec 2020 02:12:23 +0000 (21:12 -0500)
committerFlorian Eckert <fe@dev.tdt.de>
Tue, 22 Dec 2020 10:24:21 +0000 (11:24 +0100)
Now that tunnels have been fixed with openwrt commit
c9c7b4b3945c01c2aadf3ef5d9a77c8200db80f1 for stable branch 19.07
ping with src ip is no longer needed.

fixes #13655

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* Update commit message
Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
net/mwan3/Makefile
net/mwan3/files/usr/sbin/mwan3track

index 280cca471417aee7abddb850d8c2c6c232d1a9a5..5778e56604702f757718f2b11d5b182c3bf8d34d 100644 (file)
@@ -8,8 +8,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mwan3
-PKG_VERSION:=2.8.14
-PKG_RELEASE:=2
+PKG_VERSION:=2.8.15
+PKG_RELEASE:=1
 PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
 PKG_LICENSE:=GPL-2.0
 
index 4a16300355e0e185fe926d3f7884efe56b4b3455..cd4dc3be49924463182be8df9428d53b2ac62079 100755 (executable)
@@ -136,19 +136,14 @@ main() {
                        if [ $host_up_count -lt $reliability ]; then
                                case "$track_method" in
                                        ping)
-                                               # pinging IPv6 hosts with an interface is troublesome
-                                               # https://bugs.openwrt.org/index.php?do=details&task_id=2897
-                                               # so get the IP address of the interface and use that instead
                                                if echo $track_ip | grep -q ':'; then
-                                                       ADDR=$(ip -6 addr ls dev "$DEVICE" | sed -ne '/\/128/d' -e '1,/ *inet6 /s/ *inet6 \([^ \/]*\).* scope global.*/\1/p')
-                                                       [ -z "$ADDR" ] && ADDR=$(ip -6 addr ls dev "$DEVICE" | sed -ne 's/ *inet6 \([^ \/]*\).* scope global.*/\1/p')
                                                        ping_protocol=6
                                                fi
                                                if [ $check_quality -eq 0 ]; then
-                                                       $PING -$ping_protocol -I ${ADDR:-$DEVICE} -c $count -W $timeout -s $size -t $max_ttl -q $track_ip &> /dev/null
+                                                       $PING -$ping_protocol -I $DEVICE -c $count -W $timeout -s $size -t $max_ttl -q $track_ip &> /dev/null
                                                        result=$?
                                                else
-                                                       ping_result_raw="$($PING -$ping_protocol -I ${ADDR:-$DEVICE} -c $count -W $timeout -s $size -t $max_ttl -q $track_ip 2>/dev/null)"
+                                                       ping_result_raw="$($PING -$ping_protocol -I $DEVICE -c $count -W $timeout -s $size -t $max_ttl -q $track_ip 2>/dev/null)"
                                                        ping_status=$?
                                                        ping_result=$(echo "$ping_result_raw" | tail -n2)
                                                        loss="$(echo "$ping_result" | grep "packet loss" |  cut -d "," -f3 | awk '{print $1}' | sed -e 's/%//')"