mwan3: fix IPv6 support for httping command

This passes the '-6' option to httping if the address family is IPv6.

Signed-off-by: Harin Lee <me@harin.net>
This commit is contained in:
Harin Lee
2026-03-04 17:08:23 +09:00
committed by Florian Eckert
parent 91b997bb50
commit 8031e5459c
+6 -4
View File
@@ -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=$?