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

Bug#438179: [drepper@redhat.com: Re: [PATCH] getaddrinfo(): option to not sort IPv4 addresses]



I think libc is completely correct in what it's doing.  The bug is in NTP.

Historically, there is some ambiguity in the interpretation of
multiple addresses returned by a DNS query.  One possible
interpretation is to consider all the addresses as equivalent, and
therefore to try to sort them on the client, using either a longest-
prefix match or past history.  Another is to consider that the DNS
server already returns them in order of decreasing preference, and
hence to obey the order in which there were returned.

RFC 3484 finally lifts the ambiguity by mandating the first
interpretation.  You may believe that this is the wrong choice, but
this is the choice that has been made.  It is better for all of us to
have libc follow a cross-platform standard, even suboptimal, than to
make it incompatible with the rest of the universe.

In the particular case of pool.ntp.org, an application-level fix is
fortunately quite simple: ntpd should randomly reorder the addresses
it gets from DNS.  This behaviour should be optional (per-server).

Aurélien, may I suggest that you should reassign this bug to ntp?

                                        Juliusz

P.S. Ulrich, I'm very much impressed by the work you did in 2.5.
While I have your ear -- any chance of an interface to get the TTL?



Reply to: