Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 14 Jul 2018 20:52:47 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: getaddrinfo(3) / AI_ADDRCONFIG

On Sat, Jul 14, 2018 at 08:19:50PM -0400, Rich Felker wrote:
> On Sat, Jul 14, 2018 at 08:07:17PM -0400, Rich Felker wrote:
> > On Sat, Jul 14, 2018 at 07:53:53PM -0400, Christopher Friedt wrote:
> > > On Fri, Jul 13, 2018 at 10:31 PM Rich Felker <dalias@...c.org> wrote:
> > > > Here's a version with the loop. I've tested it now with ::1 removed
> > > > from device lo, but the connect to ::1 still succeeds; I suspect
> > > > presence of a default route for IPv6 makes it work since ::1 is
> > > > "routable" then. Can you confirm that it actually suppresses IPv6 in
> > > > your purely-no-IPv6 environment, as intended?
> > > 
> > > Works for me.
> > 
> > Thanks!
> 
> Minor issue: as written the patch left the cancel state disabled if it
> exited early via return EAI_NONAME. Un-hoisting the setcancelstate
> calls to fix.

And a couple other issues: socket() may fail with EAFNOSUPPORT, and in
that case, the family needs to be rejected rather than accepted like
it was with the continue. For other socket() failures (like
EMFILE/ENFILE), the result is indeterminate and we need to return
EAI_SYSTEM rather than wrong results. Making these changes and I think
it will be ready to commit.

Rich

Powered by blists - more mailing lists

Your e-mail address:

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