Re: IP addresses sorted in reverse order
> On Wed, May 31, 2006 at 11:28:44PM +0200, Matus UHLAR - fantomas wrote:
> > Searching mailinglists, bug databases did not give me correct answer.
> > Does glibc sorty/reorder IP addresses gotten from DNS?
> > Is this fixed in any newer versions of glibc?
On 01.06.06 11:39, Gabor Gombas wrote:
> AFAIK there are no requirements about the order of addresses returned by
> any NSS calls. In particular, the returned order does not need to match
> the order in the underlying database (DNS in this case). Anything that
> relies on the returned addresses having a specific order is just plainly
Nothing "relies". It's just if you will receive addresses in some order, you
should not reorder them unless you know what order they should be delivered
in (e.g. ordering via RFC3484)
> If you want to access resources in a controlled order, then you should
> choose a method that was designed for this purpose, like SRV records.
> There are not many software that supports SRV records out of the box so
> it is quite likely that you have to modify the clients.
I'm afraid this is not applicable and also you probably did not understand
If there are clients on network A and network B and servers on network A and
network B, DNS server may sort replies to clients so client A would get
address of server A first, server B next. Client B would get addresses of
server B first, server A next.
The ordering can only be automatic if clients and servers lie in the same
subnet, otherwise they can't know which is close and which is not. The DNS
server's configuration can contain more informations.
> An other option would be to play with routing instead of the DNS to
> direct your clients to the nearest server.
Pardon? If one of servers is in our company's network and other is in
differet network, company, town, how do you imagine this?
Matus UHLAR - fantomas, firstname.lastname@example.org ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
42.7 percent of all statistics are made up on the spot.