From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15453 invoked from network); 3 Aug 2020 08:16:10 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 3 Aug 2020 08:16:10 -0000 Received: (qmail 17438 invoked by uid 550); 3 Aug 2020 08:16:06 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 17415 invoked from network); 3 Aug 2020 08:16:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=samersoff.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Subject:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Nu8jsM18E0IJFiErFemBTH5qhgLG8V9SO3AyDmOfMzU=; b=J5XNFTdbIFAnudv2lN6Lg4edpA dPqchYHmLaWF7LdcP6Ga7QdMAgW4BWWjrdUHanvS8fRSrUzGOCmGwZKk2Um96p0zFaabzzy0Odrjr 8ZNsETbS2KyT/rObKTaXCBTo7QNgArU3Da4OOHevaEca8McmmeHxCRMagWaaSAx4oKtc=; To: musl@lists.openwall.com, Rich Felker References: <89b25567-5887-80ee-bfac-58b25e7a9b45@bell-sw.com> <20200227144523.GE11469@brightrain.aerifal.cx> <6b3be14d-214d-9dde-86d2-1d97684f4004@bell-sw.com> <20200730160012.GT6949@brightrain.aerifal.cx> <8bd97d8a-ff78-27a0-8231-ffd0357218eb@samersoff.net> <20200731191917.GU6949@brightrain.aerifal.cx> From: Dmitry Samersoff Message-ID: Date: Mon, 3 Aug 2020 11:15:54 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200731191917.GU6949@brightrain.aerifal.cx> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-As: dms X-SpamProbe: GOOD 0.0006253 0da93f058adcbc2e2020d87402202252 Subject: Re: [musl] getaddrinfo(3) with AI_V4MAPPED and AI_ALL flags Hello Rich, If you bind to ::ffff:0.0.0.0 on an IPv6 socket you will be able to receive IPv4 connection only. If you bind to :: on an IPv6 socket you will be able to receive both, IPv6 and IPv4 connections. So, on my opinion, if ::ffff:0.0.0.0 is the only IPv4 address on the interface it should not be returned. -Dmitry On 31.07.2020 22:19, Rich Felker wrote: > On Fri, Jul 31, 2020 at 07:21:47PM +0300, Dmitry Samersoff wrote: >> Hello Rich, >> >> I'm not sure that mapping of INADDR_ANY (0.0.0.0) and return of >> ::ffff:0.0.0.0' has any sense. >> >> Should it be filtered out on musl level? > > This is an interesting question. What happens if you bind > ::ffff:0.0.0.0 on an IPv6 socket? Is it the same as binding :: or does > it produce a v6 socket that only accepts v4 connections? If it has its > own distinct functionality then returning it when V4MAPPED is > requested seems to make some sense. > > Rich >