From: Timo Teras <timo.teras@iki.fi>
To: "Laurent Bercot" <ska-dietlibc@skarnet.org>
Cc: musl@lists.openwall.com, philip.homburg@ripe.net
Subject: Re: inet_ntop bug in 1.1.19
Date: Mon, 4 Jun 2018 21:39:21 +0300 [thread overview]
Message-ID: <20180604213921.1741da0d@vostro> (raw)
In-Reply-To: <em7bfddade-cc3c-4c49-b851-471bc6c37005@elzian>
On Mon, 04 Jun 2018 14:23:55 +0000
"Laurent Bercot" <ska-dietlibc@skarnet.org> wrote:
> >inet_ntop doesn't conform to RFC 5952 (A Recommendation for IPv6
> >Address
> >Text Representation).
> >
> >I attached a test program to demonstrate the issue and a patch:
> >$ cc inet_ntop_test.c musl-1.1.19/src/network/inet_ntop.c
> >$ ./a.out
> >Section 4.2.2 test failed: got 2001:db8::1:1:1:1:1, expected
> >2001:db8:0:1:1:1:1:1
>
> https://tools.ietf.org/html/rfc5952#section-4.2.1 says:
> "The use of the symbol "::" MUST be used to its maximum capability."
>
> 2001:db8::1:1:1:1:1 is the correct canonical text representation.
The following section 4.2.2 says:
4.2.2. Handling One 16-Bit 0 Field
The symbol "::" MUST NOT be used to shorten just one 16-bit 0 field.
For example, the representation 2001:db8:0:1:1:1:1:1 is correct, but
2001:db8::1:1:1:1:1 is not correct.
Looks like the test case is taken directly from this.
Timo
next prev parent reply other threads:[~2018-06-04 18:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-04 13:57 Philip Homburg
2018-06-04 14:23 ` Laurent Bercot
2018-06-04 18:39 ` Timo Teras [this message]
2018-06-05 0:37 ` Rich Felker
2018-06-26 20:56 ` Rich Felker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180604213921.1741da0d@vostro \
--to=timo.teras@iki.fi \
--cc=musl@lists.openwall.com \
--cc=philip.homburg@ripe.net \
--cc=ska-dietlibc@skarnet.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).