gping hangs when trying to ping an ipv6 address
gping 127.0.0.1 works as expected, but gping ::1 just gives a blank screen.
Ah. Yeah. The regex used to parse the output from ping only handles ipv4 addresses.
I’ll update it
Ahh, right. So we need to invoke ping6 instead of ping for ipv6 addresses. This complicates things, let me have a think of the best way to do this.
Linux ping6 is the same thing as ping since ~2015 or so, though that may be dependent on packaging (because of course).
Hey, can either of you run ping ::1 and send me some lines of output here?
From Windows 10:
Pinging ::1 with 32 bytes of data:
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Ping statistics for ::1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
From Debian 10:
PING ::1(::1) 56 data bytes
64 bytes from ::1: icmp_seq=1 ttl=64 time=0.054 ms
64 bytes from ::1: icmp_seq=2 ttl=64 time=0.081 ms
64 bytes from ::1: icmp_seq=3 ttl=64 time=0.054 ms
64 bytes from ::1: icmp_seq=4 ttl=64 time=0.102 ms
64 bytes from ::1: icmp_seq=5 ttl=64 time=0.060 ms
^C
--- ::1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 100ms
rtt min/avg/max/mdev = 0.054/0.070/0.102/0.019 ms
gping ::1 seems to work for me. Has this issue been fixed or what?

Version info:
gping 1.2.0 from crates.io
Linux 5.8.0-44-generic
Ubuntu 20.04.2
ip a output:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
Hi all, I've tried this on macOs and it doesn't seem to work either.
gping 1.2.1
It just hangs.
ping and ping6 commands output:
ping ::1
ping: cannot resolve ::1: Unknown host
ping6 ::1
PING6(56=40+8+8 bytes) ::1 --> ::1
16 bytes from ::1, icmp_seq=0 hlim=64 time=0.098 ms
^C
--- ::1 ping6 statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 0.098/0.098/0.098/0.000 ms
Also: I am not if this is related. But for some domains gping -6 HOSTNAME works and for some (resolvable to IPv6 address only) it hangs.