Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140531015604.GD507@brightrain.aerifal.cx>
Date: Fri, 30 May 2014 21:56:04 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: Resolver overhaul started

On Fri, May 30, 2014 at 12:41:06AM -0400, Rich Felker wrote:
> I've started working on the resolver overhaul with a design based on
> what I described in the thread "Resolver overhaul concepts". The code

And now I have a working implementation of everything the old
getaddrinfo did except dns lookups, plus support for returning both
tcp and udp service results for the same query, and accepting service
aliases.

One big open question is if/how we should implement the rfc 3484 stuff
for sorting results. In principle it's easy to do now since the
refactoring gives us a nice list of results that can be sorted before
the output is produced, but I don't understand the way the rules are
intended to be applied at all. It looks to me like lots of them
require consulting the routing table -- this can probably be done with
udp and socket+bind+connect+getsockname to determine the local address
that would be used to send to a given remote address, without actually
sending any packets, but doing so may be measurably slow. Also note
that qsort isn't a good choice for the sorting since the rfc seems to
demand a stable sort; fortunately the set size is so small that naive
sorts should be fine.

I still need to work out the best factoring for dns code so that it's
useful for both the legacy res_* and dn_* stuff and the massively
parallel lookups we want for getaddrinfo. I'll probably work on this
next since I can't really commit anything to master until there are no
obvious feature regressions.

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.