Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120930190545.GM254@brightrain.aerifal.cx>
Date: Sun, 30 Sep 2012 15:05:46 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: Request for reports on ipv6 issues

On Sun, Sep 30, 2012 at 12:57:18PM -0400, Rich Felker wrote:
> One area I've been meaning to address for a while is the quality and
> completeness of ipv6 support in musl. I've never used ipv6 seriously
> so while I can read the specification for how the interfaces are
> supposed to behave, I don't have any good intuition beyond that.
> 
> I know AI_ADDRCONF is not supported, and should be. I also know glibc
> has experienced a lot of bugs with it not behaving as expected, so
> this one probably requires some attention to the details.

The concept of having an "address configured" seems to be poorly
defined. So far, the approach that seems ideal to me is, when
AI_ADDRCONFIG is specified, attempting to connect a datagram socket to
each candidate address. This will not generate any network traffic,
and will succeed if and only if the kernel thinks there's a route.
This approach also allows us to obtain the source address that would
be used to make a connection, so that the semantics of RFC 3484 could
be implemented if desired. However, I'd rather not go there unless a
need is demonstrated.

It may be possible (albeit a stretch) to claim the current behavior
(igoring AI_ADDRCONFIG entirely) is conformant when used on Linux
systems in the default configuration, since the loopback interface by
default has IPv4 and IPv6 addresses configured. Whether this behavior
suffices to make applications happy, I have no idea.

> Apparently ipv6 has some sort of "scope" which I don't understand, and
> which I don't think we handle now.

Link local addresses, etc., are only valid in the context of a
particular scope id. For link-local, that id is the interface number.
This explains why POSIX standardized the otherwise-apparently-useless
if_nametoindex and if_indextoname functions: to fill in the scope id
of ipv6 link-local addresses.

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.