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

Bug#60743: libc6: getaddrinfo tries to resolve in an order disobeying /etc/host.conf



In message <7iaejufn6m.fsf@ast16.csis.hku.hk>, Isaac To writes:
>--pgp-sign-Multipart_Mon_Mar_20_09:24:45_2000-1
>Content-Type: text/plain; charset=US-ASCII
>
>>>>>> "Philip" == Philip Blundell <Philip.Blundell@pobox.com> writes:
>
>    Philip> The getaddrinfo() function should return *all* the matching
>    Philip> addresses as a linked list.  It is up to the calling application
>    Philip> to decide the order in which it uses them.
>
>    Philip> If you think that some addresses are missing, can you give more
>    Philip> details?
>
>What I mean is that I expect NS switch to do the following:
>
>  for each "order" entry in host.conf (hosts, bind, etc)
>    for each protocol suite (IPv6, IPv4)
>      if the address is found
>        stop processing and return all info found.
>
>What I think it is doing is
>
>  for each protocol suite (IPv6, IPv4)
>    for each "order" entry in host.conf (hosts, bind, etc)
>      if the address is found
>        stop processing and return all info found.

Neither of these is the case.  The getaddrinfo function won't stop processing 
just because it has found an entry; it will continue searching other protocols 
and methods to see if there are more details.

>I found this a big problem basically because my machine is within a local
>network masquaraded by only a server with a dialup link.  DNS queries is
>very slow (it takes 1 minute to dialup my provider and have everything
>settled before a DNS request can be served).  If my /etc/hosts file already
>contains the name/address pair of a host (basically meaning that it is a
>host in the local network), I really don't want a query to the remote DNS
>server.

You should probably set up a local DNS server for this situation.

p.



Reply to: