Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 3 Aug 2020 11:15:54 +0300
From: Dmitry Samersoff <dms@...ersoff.net>
To: musl@...ts.openwall.com, Rich Felker <dalias@...c.org>
Subject: Re: 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
> 

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.