On Tue 26/Mar/2024 20:14:27 +0100 Aurelien Jarno wrote:
On 2024-03-26 12:53, Alessandro Vesely wrote:
Package: libc6
Version: 2.36-9+deb12u4
Severity: normal
Tags: ipv6
Dear Maintainer,
I compiled the example program given in the inet_pton(3) man page, and obtain
the following:
$ ./a.out i6 0:0:0:ffff:5:6:7:8
::ffff:5:6:7:8
$ ./a.out i6 0:0:0:ffff:5.6.7.8
Not in presentation format
$ ./a.out i6 0:0:0:0:0:ffff:5.6.7.8
::ffff:5.6.7.8
Could you please tell me what do you find curious and what do you expect
instead? Thanks.
Yeah, sorry about that. I counted one word per tag, irrespective of it being
hex or decimal. So, for the last case I though heck, 10 tag is 160-bit. I was
so persuaded that, when Bastian told me the 8-word "0:0:0:ffff:5.6.7.8" is not
valid I went to RFC 4291 and when I read there that the 10-tag IP
0:0:0:0:0:0:13.1.68.3 is valid, I started filling an errata against it. I
copied the following passage with the idea of correcting it by removing a
couple of "x"s.
3. An alternative form that is sometimes more convenient when dealing
with a mixed environment of IPv4 and IPv6 nodes is
x:x:x:x:x:x:d.d.d.d, where the 'x's are the hexadecimal values of
the six high-order 16-bit pieces of the address, and the 'd's are
the decimal values of the four low-order 8-bit pieces of the
address (standard IPv4 representation).
Only at that point I read the text carefully and realized how mistaken I was.
I aborted the errata submission, of course. But for the bug report, which I
had already sent, I can only apologize.
Best
Ale