BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000660 [uClibc] Networking Support minor always 01-25-06 16:52 11-01-08 16:26
Reporter akvadrako View Status public  
Assigned To uClibc
Priority normal Resolution open  
Status assigned   Product Version 0.9.28
Summary 0000660: getaddrinfo() queries are redundant and in odd order
Description I have IPv6 support enabled and three DNS servers listed in /etc/resolv.conf. I'm looking up a hostname that only has an A record. uClibc's getaddrinfo() looks up the records by trying each nameserver in order then trying again two more times. When the family is AF_UNSPEC, it completes this process for AAAA records then A records.

So in my case, to get the A record, I have to wait for 9 queries to fail first. Since they timeout in ten seconds, this is unacceptably long if some of the DNS servers are down.

To make the situation worse, getaddrinfo() doesn't trust query responses with no answers. Instead it treats them as an error, and repeats the query, even to the same host.

RFC1035 recommends retransmissions (but not timeouts) every 2-5 seconds. I suggest three changes to the current lookup method:

  * trust the first response without an error, even if negative
  * ask for both type of records in each query (adds negligable size)
  * retransmit every 5 seconds, not every 10
Additional Information
Attached Files

- Relationships

- Notes
(0001005)
vapier
01-25-06 19:04

can you try the patch in Bug 473:
http://busybox.net/bugs/file_download.php?file_id=389&type=bug [^]
 
(0001006)
akvadrako
01-25-06 21:10

Patch 389 is not relevant to this issue. This issue does not deal with search domains or invalid encoding of domain names. The problems discussed in this issue apply to queries of all domain names.
 
(0014804)
vda
11-01-08 16:26

Revision 23895 contains a fix to not treat negative responses as errors.
 

- Issue History
Date Modified Username Field Change
01-25-06 16:52 akvadrako New Issue
01-25-06 16:52 akvadrako Status new => assigned
01-25-06 16:52 akvadrako Assigned To  => uClibc
01-25-06 19:04 vapier Note Added: 0001005
01-25-06 21:10 akvadrako Note Added: 0001006
07-25-06 14:34 dcostako Issue Monitored: dcostako
11-01-08 16:26 vda Note Added: 0014804


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker