From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13016 Path: news.gmane.org!.POSTED!not-for-mail From: Christopher Friedt Newsgroups: gmane.linux.lib.musl.general Subject: Re: getaddrinfo(3) / AI_ADDRCONFIG Date: Tue, 10 Jul 2018 21:01:19 -0400 Message-ID: References: <20180709223805.GS1392@brightrain.aerifal.cx> <20180710005943.GT1392@brightrain.aerifal.cx> <20180710150854.GU1392@brightrain.aerifal.cx> <20180711003816.GV1392@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1531270780 28269 195.159.176.226 (11 Jul 2018 00:59:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 11 Jul 2018 00:59:40 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-13032-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jul 11 02:59:35 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 1fd3Tj-0007GH-Mb for gllmg-musl@m.gmane.org; Wed, 11 Jul 2018 02:59:35 +0200 Original-Received: (qmail 7662 invoked by uid 550); 11 Jul 2018 01:01:43 -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 7644 invoked from network); 11 Jul 2018 01:01:43 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Cc+7xazRWmIh09a457kxazqvPTFDKM8ftqH76BZM97Y=; b=fXgULJwWC0PFO5MYUF4EBKQU+7U9+P2p15EV+oXy47WEKLLAidNJIG60hVZOZr221f W8zPAu+HNxFR45FTzLsGAiR654yqYdVmB1Anl8KiCCeCpt/PKOsaBuVag3lrUS5fjIOh B7gydPfa5xxQNGiMj4hs13GB4iRSixb4gziH3yfdvef2IvHv2sPm9Wvqdw4gnOo2T5IG komrlTSbl4yFXJ5AhF7UEHYxXynlvidhww6pjM1LTtfiNJgcuVogAj6R4hTtRt+U4B2j EbvohUN4pTazzgeER4K/nIbO19jZEVg939GIjDGIOewU878qULHdSHcfcAxcp7WFAbI0 cxzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Cc+7xazRWmIh09a457kxazqvPTFDKM8ftqH76BZM97Y=; b=mzL+J4SWIN9gesrWMRtI90zlsGdiZivfaRJWYu6Bvl3Y903Ln/WyZ7izhbD/R/TT8a EzGgb/kDAKeqFnkjf/GG1RXi1peOhK9eXiqyNMkRS+PPFyVnZ4o6vUln/ryM1A4II+Vw wpmm2b5bhmtBBsf7CrM1pQ9r3yRALDHVrxe8nWPj2JYsWzm52JacAQZPPxIxBVYVLmmn 7FGC4XY+YwNH0sTSouaMRaSsTsVwB6Ww0KL8xxcEmqC/EPIDOYMcshF8VGi4N7Q0xSlO pe3Qt6BXiQU83ixLvmbPo/NRX9aVypmuoZsbG0ErfhGPyRAKkbkLy3aAA0H0ilJ+GcWJ R4Rg== X-Gm-Message-State: APt69E1w/ANzpV0fvVpM/T8HXG08MjGSYDfV+OowCibvtMTZxztzT7cG Zny4PnUF8sZzDHLVjVTsjIUjEnf4xBZ/kPky8Pvah7wU X-Google-Smtp-Source: AAOMgpctCU1x2pxBeJE7KikbgqCyiC68TiUHVCKZEZAVxOmwS2cXowQMR4lX2tbf4H7xGt19hkVsH8ZQo9BhlKgLbpg= X-Received: by 2002:aca:3882:: with SMTP id f124-v6mr3616493oia.195.1531270890949; Tue, 10 Jul 2018 18:01:30 -0700 (PDT) In-Reply-To: <20180711003816.GV1392@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:13016 Archived-At: On Tue, Jul 10, 2018 at 8:38 PM Rich Felker wrote: > Regardless of what's done on the musl side, I think it would make > sense for thrift to change its strategy for selecting an address to Let's take thrift out of the equation and read the POSIX spec. Directrly from [1]: "If the AI_ADDRCONFIG flag is specified, IPv4 addresses shall be returned only if an IPv4 address is configured on the local system, and IPv6 addresses shall be returned only if an IPv6 address is configured on the local system." There are precisely zero IPv6 addresses configured on the local system. There is precisely two IPv4 address configured on the local system (127.0.0.1, and 172.17.0.2 in this case). Regardless of whether loopbacks are ignored, you are breaking POSIX spec with your current implementation. Period. Regards, C [1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/getaddrinfo.html