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

Re: gethostby* users



On Sun, 2007-10-14 at 15:15 -0600, Topher wrote:
> Ulrich Drepper wrote:
> > Les Mikesell wrote:
> >> But, if they
> >> resort the list, half of them will pick the wrong first choice even when
> >> it is reachable.
> > 
> > No.  The sorting performed is not a universal and complete ordering.
> > For once, it depends on the addresses of the client machines.  Second,
> > if all target addresses are equally "bad" (i.e., for IPv4, all have the
> > same matching prefix length) the sorting will not change the order in
> > which the entries are returned.  Hence the RR DNS will not lose its effect.
> > 
> 
> This debate has splintered a bit on the list, but it seems to me that
> everybody's concern has to do with this unfamiliar sorting algorithm.
> Am I right, or does somebody have another concern, unrelated to the
> sorting algorithm?

Sorting is the only point we are discussing.

> Ulrich's last comment made me think that DNS results will be sorted a
> lot less than people seem to think.  It also seems that the biggest
> cause of this whole misunderstanding is that Ulrich appears to be the
> only one who understands when and how this mysterious sorting algorithm
> is applied.

Not mysterious at all, read the RFC (easier) and glibc source code and
you'll know all about it.

> Ulrich: Is there a clear spec that outlines the behavior of this
> function, or will we just have to go examine the source code?  I think
> that if we all had a more realistic and concrete idea about how this
> function performs, that we'd all sleep better tonight. :)

I didn't see the code diverge much from the RFC, but I didn't do a
strict analysis either, just enough to be concerned about the artificial
(for IPv4) difference between site-local and global scope addresses
(which is dictated by the RFC). That's my principal concern, so far.

Simo.


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