[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: glibc's getaddrinfo() sort order

On Thu, Sep 13, 2007 at 12:14:09AM +0000, Anthony Towns wrote:
> On Thu, Sep 13, 2007 at 12:06:40AM +0100, Ian Jackson wrote:
> > Does anyone have an answer to my point that application of rule 9
> > changes the long-established meaning of existing DNS data ?
> I'm not familiar with how getaddrinfo() has been implemented in the
> past -- but I think it makes more sense to look at the definition of
> the function than the data it's manipulating.
> The RFC tries to make getaddrinfo return a predictable ordering in the
> face of random orderings from DNS. That seems a perfectly reasonable
> way to define a function in the abstract; though certainly the ordering
> it comes up with can be criticised.
> > I disagree with your answer to that first question.  gethostbyname
> > returns results in random order.  getaddrinfo should do the same.
> I'd say it's more important that getaddrinfo() on Debian behave "the same"
> as on other operating systems, than that it behave in the same way as
> other functions. I can only take the RFC's assertion as to getaddrinfo()'s
> proper behaviour though; I don't have a more direct idea how getaddrinfo()
> behaves in previous versions of Debian, other Linux distros, other libcs,
> Windows, etc.

  Our tests shows that windows XP since SP1 (or 2 ?), vista, various
recent BSD, and now glibc 2.6 (or 2.5 I don't remember when it was
introduced) all behave this way. I've no access to macos X, but I
wouldn't be surprised it works the same.  Another interesting hint would
be to test on solaris too.

·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

Attachment: pgp5FAzKuzaNN.pgp
Description: PGP signature

Reply to: