a way to disable AAAA lookups in the resolver
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
glibc (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
Consider the following scenario:
- a router with wifi (netopia 3357NWG-VGx)
- an ubuntu linux laptop
- a windows laptop
The router runs, the Windows laptop has no trouble accessing the Internet but the experience on the linux laptop is painful. It's slow, very slow. It's frustrating.
After fiddling a bit the problem is the following:
zapek@bacterion:~$ telnet www.google.com 80
(and on another terminal)
zapek@bacterion:~$ sudo tcpdump -ni eth1 -s 500 udp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 500 bytes
10:49:23.597006 IP 192.168.1.35.32794 > 192.168.1.1.53: 57104+ AAAA? www.google.com. (32)
10:49:28.592020 IP 192.168.1.35.32794 > 192.168.1.1.53: 57104+ AAAA? www.google.com. (32)
10:49:33.592386 IP 192.168.1.35.32794 > 192.168.1.1.53: 35778+ AAAA? www.google.com. (32)
10:49:38.592590 IP 192.168.1.35.32794 > 192.168.1.1.53: 35778+ AAAA? www.google.com. (32)
10:49:43.592942 IP 192.168.1.35.32794 > 192.168.1.1.53: 44009+ A? www.google.com. (32)
Ok. Now as you can see, glibc's resolver is attempting to resolve AAAA records first. The router is not answering those queries so it timeouts 4 times until it tries the A record. That takes 20 seconds.
I know the router is to blame as it should answer instead of ignoring the query but consider this:
- I heard of this problem from several friends so I'm not alone
- this is the latest firmware since a long time
- this is the router that is sent to all Swisscom (bluewin) customers in Switzerland
- a default installation of Windows XP has no problems with this
Now, what really annoys me is that I disabled the 'ipv6' module but the resolver *still* attempts to resolve AAAA records. This doesn't make sense because even if the AAAA record would resolve, my system couldn't do anything with it.
So, is it possible to have glibc be a bit smarter and actually detect if AAAA records would be needed?
Thanks
Hi,
First double check that you've really disabled IP6.
IMO A system wide AAAA lookups doesn't make sense and there's already
a way to disable them in lookup:
hints.ai_flags = AI_ADDRCONFIG;
....
getaddrinfo (...
Too bad telnet and at least gaim don't use it, but most gnome applications and firefox do.
on the other hand an easy way to disable IPV6 would be nice, sometimes it's a real problem and not only with broken router (slow or congested uplink).