From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12896 Path: news.gmane.org!.POSTED!not-for-mail From: Timo Teras Newsgroups: gmane.linux.lib.musl.general Subject: Re: inet_ntop bug in 1.1.19 Date: Mon, 4 Jun 2018 21:39:21 +0300 Message-ID: <20180604213921.1741da0d@vostro> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1528137454 15046 195.159.176.226 (4 Jun 2018 18:37:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 4 Jun 2018 18:37:34 +0000 (UTC) Cc: musl@lists.openwall.com, philip.homburg@ripe.net To: "Laurent Bercot" Original-X-From: musl-return-12912-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jun 04 20:37:30 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1fPuME-0003pa-Gb for gllmg-musl@m.gmane.org; Mon, 04 Jun 2018 20:37:30 +0200 Original-Received: (qmail 7890 invoked by uid 550); 4 Jun 2018 18:39:37 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 7866 invoked from network); 4 Jun 2018 18:39:37 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZaSCQrOGXb40XKDyCttPV/k5b8COGQnu5q3xpuz4Wz8=; b=qYrDs7DiUr3QOInpjkdkAYDnQCNozjokP2aNAI3BEx3s27xt+FSZNoC9QGHwsBnCZX tClLTyZ/QywmHkEWdkhoRyRT/eMUUB1iB0MJv12zBmL9vSuBOj5g932suk69SlSUuDWU N+aUWMuoLId7J/MgVW7KyN0+FcLqsaEfrsJnemd/C/lrx1rAeAC7jEpEzTk6RyQBunu6 H5ouhouGlgsE2SK2P3Bc26HLYt7vV6t/kyTfyd1Y5R+Bqawc/NYUGEZ7clvKeZJb1qrw Vu1fnAIOx77kRUfO79r6KPtyet2KyTXG6r5Nc8F9H9aW+ykC8OTSORfsgZYAz3yW5aEh pPgA== X-Gm-Message-State: APt69E3SXXp8AeN0qgSbLXDqoNnN+UabQ+JU5ruQ6IfIZG9iurjdd2Y9 Y7FBrA/xq4TMoI+uWllfgBh4N6O7 X-Google-Smtp-Source: ADUXVKLHHGLahI9YMjAUUfFhd2m4lHexZbi/m8zn6XZv0fA+ClxuAs1xf1Zk7JEDDfehIbw44yeWRg== X-Received: by 2002:aed:3d92:: with SMTP id i18-v6mr22150356qtf.149.1528137565353; Mon, 04 Jun 2018 11:39:25 -0700 (PDT) In-Reply-To: X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-alpine-linux-musl) Xref: news.gmane.org gmane.linux.lib.musl.general:12896 Archived-At: On Mon, 04 Jun 2018 14:23:55 +0000 "Laurent Bercot" 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