From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13045 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: getaddrinfo(3) / AI_ADDRCONFIG Date: Sat, 14 Jul 2018 20:52:47 -0400 Message-ID: <20180715005247.GK1392@brightrain.aerifal.cx> References: <20180711164417.GX1392@brightrain.aerifal.cx> <20180711170034.GY1392@brightrain.aerifal.cx> <20180713014910.GC1392@brightrain.aerifal.cx> <20180714023134.GH1392@brightrain.aerifal.cx> <20180715000717.GI1392@brightrain.aerifal.cx> <20180715001950.GJ1392@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1531615856 21698 195.159.176.226 (15 Jul 2018 00:50:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 15 Jul 2018 00:50:56 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-13061-gllmg-musl=m.gmane.org@lists.openwall.com Sun Jul 15 02:50:52 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 1feVFT-0005YA-MR for gllmg-musl@m.gmane.org; Sun, 15 Jul 2018 02:50:51 +0200 Original-Received: (qmail 29771 invoked by uid 550); 15 Jul 2018 00:52:59 -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 29752 invoked from network); 15 Jul 2018 00:52:59 -0000 Content-Disposition: inline In-Reply-To: <20180715001950.GJ1392@brightrain.aerifal.cx> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:13045 Archived-At: On Sat, Jul 14, 2018 at 08:19:50PM -0400, Rich Felker wrote: > On Sat, Jul 14, 2018 at 08:07:17PM -0400, Rich Felker wrote: > > On Sat, Jul 14, 2018 at 07:53:53PM -0400, Christopher Friedt wrote: > > > On Fri, Jul 13, 2018 at 10:31 PM Rich Felker wrote: > > > > Here's a version with the loop. I've tested it now with ::1 removed > > > > from device lo, but the connect to ::1 still succeeds; I suspect > > > > presence of a default route for IPv6 makes it work since ::1 is > > > > "routable" then. Can you confirm that it actually suppresses IPv6 in > > > > your purely-no-IPv6 environment, as intended? > > > > > > Works for me. > > > > Thanks! > > Minor issue: as written the patch left the cancel state disabled if it > exited early via return EAI_NONAME. Un-hoisting the setcancelstate > calls to fix. And a couple other issues: socket() may fail with EAFNOSUPPORT, and in that case, the family needs to be rejected rather than accepted like it was with the continue. For other socket() failures (like EMFILE/ENFILE), the result is indeterminate and we need to return EAI_SYSTEM rather than wrong results. Making these changes and I think it will be ready to commit. Rich