mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: Request for reports on ipv6 issues
Date: Sun, 30 Sep 2012 15:05:46 -0400	[thread overview]
Message-ID: <20120930190545.GM254@brightrain.aerifal.cx> (raw)
In-Reply-To: <20120930165718.GA3043@brightrain.aerifal.cx>

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


      reply	other threads:[~2012-09-30 19:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-30 16:57 Rich Felker
2012-09-30 19:05 ` Rich Felker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120930190545.GM254@brightrain.aerifal.cx \
    --to=dalias@aerifal.cx \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).