mwan3: fix IPv6 support for httping command
authorHarin Lee <redacted>
Wed, 4 Mar 2026 08:08:23 +0000 (17:08 +0900)
committerFlorian Eckert <redacted>
Wed, 11 Mar 2026 13:24:47 +0000 (14:24 +0100)
This passes the '-6' option to httping if the address family is IPv6.

Signed-off-by: Harin Lee <redacted>
net/mwan3/files/usr/sbin/mwan3track

index 91a816de23bbbfe864e13a28267342759766af82..bd81f7c07b24c62c12df417cfed018e1ef7ec75f 100755 (executable)
@@ -314,19 +314,21 @@ main() {
                                                result=$?
                                        ;;
                                        httping)
+                                               local ipv6_opt
+                                               [ "$FAMILY" = "ipv6" ] && ipv6_opt="-6"
                                                if [ $check_quality -eq 0 ]; then
                                                        if [ "$httping_ssl" -eq 1 ]; then
-                                                               WRAP httping -c $count -t $timeout -q "https://$track_ip" &> /dev/null &
+                                                               WRAP httping $ipv6_opt -c $count -t $timeout -q "https://$track_ip" &> /dev/null &
                                                        else
-                                                               WRAP httping -c $count -t $timeout -q "http://$track_ip" &> /dev/null &
+                                                               WRAP httping $ipv6_opt -c $count -t $timeout -q "http://$track_ip" &> /dev/null &
                                                        fi
                                                        wait $!
                                                        result=$?
                                                else
                                                        if [ "$httping_ssl" -eq 1 ]; then
-                                                               WRAP httping -c $count -t $timeout "https://$track_ip" 2> /dev/null > $TRACK_OUTPUT &
+                                                               WRAP httping $ipv6_opt -c $count -t $timeout "https://$track_ip" 2> /dev/null > $TRACK_OUTPUT &
                                                        else
-                                                               WRAP httping -c $count -t $timeout "http://$track_ip" 2> /dev/null > $TRACK_OUTPUT &
+                                                               WRAP httping $ipv6_opt -c $count -t $timeout "http://$track_ip" 2> /dev/null > $TRACK_OUTPUT &
                                                        fi
                                                        wait $!
                                                        ping_status=$?
git clone https://git.99rst.org/PROJECT