mwan3: Bug fixes with nping usage

The IP address family is a single dash option and one of 4 or 6, not tcp
or udp.

Signed-off-by: Brian J. Murrell <brian@interlinx.bc.ca>
This commit is contained in:
Brian J. Murrell
2025-01-09 13:57:07 +00:00
committed by Florian Eckert
parent 473ea34a92
commit c442892978

View File

@@ -322,7 +322,7 @@ main() {
fi
;;
nping-*)
WRAP nping -c $count $track_ip --${FAMILY#nping-} > $TRACK_OUTPUT &
WRAP nping -${FAMILY#ipv} -c $count $track_ip --${track_method#nping-} > $TRACK_OUTPUT &
TRACK_PID=$!
wait $TRACK_PID
result=$(grep Lost $TRACK_OUTPUT | awk '{print $12}')