From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5211 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: ipv6 scope id support Date: Mon, 9 Jun 2014 14:53:37 -0400 Message-ID: <20140609185337.GJ179@brightrain.aerifal.cx> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1402340040 19690 80.91.229.3 (9 Jun 2014 18:54:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Jun 2014 18:54:00 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-5216-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jun 09 20:53:53 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Wu4hb-00038M-Dy for gllmg-musl@plane.gmane.org; Mon, 09 Jun 2014 20:53:51 +0200 Original-Received: (qmail 23569 invoked by uid 550); 9 Jun 2014 18:53:49 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 23561 invoked from network); 9 Jun 2014 18:53:49 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:5211 Archived-At: On Mon, Jun 09, 2014 at 10:35:39PM +0800, orc wrote: > Hi list! > Great to see major changes towards dns code cleanup and rewrite! Here another one: > As I understand, this is a feature when you can specify destination link-local address and from which interface packets are sent. The address and interface are both specified, being separated by '%' (for example, ff02::1%eth0) > I've grepped into glibc sources and found that this step is performed somewhere in dns resolver. > > Does musl support this? My current attempt to use it failed. Can you explain what you did that failed? getaddrinfo should always accept %nnnn (numeric scope_id) following a numeric address string, and accepts %ifname if the address has link-local scope (as determined by IN6_IS_ADDR_LINKLOCAL || IN6_IS_ADDR_MC_LINKLOCAL). Likewise, getnameinfo will reverse the scope_id to an interface name only fork link-local addresses, and the reversal can be inhibited with the NI_NUMERICSCOPE flag. For non-numeric addresses, scope_id is not parsed at all, but entries in /etc/hosts can have a scope_id attached to them. If any of this logic seems incorrect to you, please explain what you think should be changed. Rich