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

Re: IP addresses sorted in reverse order

Matus UHLAR - fantomas a écrit :
Matus UHLAR - fantomas a écrit :

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)

On 01.06.06 18:30, Aurelien Jarno wrote:

Where have you seen the resolver should not reorder the addresses? Any pointer?


I just thought that there's no logical reason to reordering addresses if
resolver does not know network topology. So I'd like to know the reason for
reordering. Is it the way how resolver manipulates addresses, so it stores
them in reverse order?

Yes probably something internal, I don't know exactly. You could have a look at the code to find why.

The relevant documents for the resolver are the RFCs. Have a look at RFC1034, pages 10 and 11:

| A domain name identifies a node.  Each node has a set of resource
| information, which may be empty.  The set of resource information
| associated with a particular name is composed of separate resource
| records (RRs).  The order of RRs in a set is not significant, and need
| not be preserved by name servers, resolvers, or other parts of the
| DNS.

So the glibc is fully compliant with the RFC. There is nothing wrong with it.

except it spoils any attempt to sort RRs so they are in network topology
order :-(

Yes but it is allowed, so that's probably your implementation which is buggy. Anyway, I wouldn't rely on something that is not guaranteed...

  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

Reply to: