Package: oping
Version: 1.10.0-4+b1
Severity: normal
File: /usr/bin/noping
Tags: ipv6
X-Debbugs-Cc: [email protected]
On some IPv4-only networks, DNS results sometimes include AAAA
records. Most programs correctly handle this situation and fall back
to the A record. For example, if you curl `www.torproject.org`, it
uses the A or AAAA record depending on whether you are on a IPv6 or
IPv4 network:
anarcat@curie:~(main)$ curl -s -v -I www.torproject.org 2>&1 | head -1
* Trying 116.202.120.165:80...
anarcat@marcos:~$ curl -s -v -I www.torproject.org 2>&1 | head -1
* Trying 2604:8800:5000:82:466:38ff:fecb:d46e:80...
marcos is on an IPv6 network, curie isn't.
Web browsers also handle this gracefully.
oping (and, obviously noping) doesn't handle this correctly:
anarcat@curie:~(main)$ oping -c 1 www.torproject.org
PING www.torproject.org (2a01:4f8:fff0:4f:266:37ff:feae:3bbc) 56 bytes of data.
echo reply from www.torproject.org (2a01:4f8:fff0:4f:266:37ff:feae:3bbc):
icmp_seq=1 timeout
--- www.torproject.org ping statistics ---
1 packets transmitted, 0 received, 100,00% packet loss, time 0,0ms
For what it's worth, iputils-ping doesn't have the same bug, but
that's only because it defaults to IPv4 instead, which isn't ideal:
anarcat@marcos:~$ ping -c 1 www.torproject.org
PING www.torproject.org (38.229.82.25): 56 data bytes
64 bytes from 38.229.82.25: icmp_seq=0 ttl=57 time=29,997 ms
--- www.torproject.org ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/stddev = 29,997/29,997/29,997/0,000 ms
anarcat@curie:~(main)$ ping -c 1 www.torproject.org
PING www.torproject.org (95.216.163.36) 56(84) bytes of data.
64 bytes from hetzner-hel1-03.torproject.org (95.216.163.36): icmp_seq=1 ttl=44
time=129 ms
--- www.torproject.org ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 128.706/128.706/128.706/0.000 ms
... but that's a different question.
the `oping` manpage specifically advertises IPv6 support this way:
In contrast to the fping utility (URL is listed in "SEE ALSO")
oping can use both, IPv4 and IPv6 transparently and side by side.
And, for what *that's* worth, fping actually does the correct thing
here:
anarcat@marcos:~$ fping -A -c 1 www.torproject.org
2604:8800:5000:82:466:38ff:fecb:d46e : [0], 64 bytes, 34.9 ms (34.9 avg, 0%
loss)
2604:8800:5000:82:466:38ff:fecb:d46e : xmt/rcv/%loss = 1/1/0%, min/avg/max =
34.9/34.9/34.9
anarcat@curie:~(main)$ fping -A -c 1 www.torproject.org
116.202.120.165 : [0], 64 bytes, 112 ms (112 avg, 0% loss)
116.202.120.165 : xmt/rcv/%loss = 1/1/0%, min/avg/max = 112/112/112
(It should also be noted here that fping *can* use both IPv4 and IPv6
transparently, see the `-m` option, so the above quote is actually
incorrect.)
-- System Information:
Debian Release: 11.2
APT prefers stable-security
APT policy: (500, 'stable-security'), (500, 'stable-debug'), (500, 'stable'),
(1, 'unstable'), (1, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.10.0-11-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages oping depends on:
ii libc6 2.31-13+deb11u2
ii libncursesw6 6.2+20201114-2
ii liboping0 1.10.0-4+b1
ii libtinfo6 6.2+20201114-2
oping recommends no packages.
oping suggests no packages.
-- no debconf information