Bug 601295 - Problem with A/AAAA DNS requests
Summary: Problem with A/AAAA DNS requests
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 13
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Andreas Schwab
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2010-06-07 16:11 UTC by Chris Adams
Modified: 2010-06-10 12:59 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-06-10 12:59:54 UTC

Attachments (Terms of Use)

Description Chris Adams 2010-06-07 16:11:09 UTC
When something (Firefox, telnet, etc.) looks up a hostname, the library (I guess libresolv) is doing both an A and an AAAA request.  I've run into a problem with this.

The two DNS requests are sent from the same UDP port before waiting for a response.  This appears to trigger a bug in at least Juniper SSG firewalls (my guess is that the first response is seen as complete and the session is removed as "done").  For comparison, Mac OS X appears to send the A and AAAA requests from different ports, which doesn't cause this problem.

The symptom is that any connection attempt (ssh to a host, send/receive mail, click on a link in Firefox) hangs for several seconds, until the AAAA lookup times out.  Since there doesn't appear to be a local way to disable the double lookup, access from behind such firewalls is painfully slow.

I understand that the real problem is buggy firewalls, but IMHO it would be good to change the Linux lookups for better compatibility with the "real world".

Comment 1 Andreas Schwab 2010-06-08 07:58:18 UTC
Try options single-request.

Comment 2 Chris Adams 2010-06-08 13:30:58 UTC
"options single-request" does seem to work around the problem.  Is this option documented anywhere?  I don't see it in the resolv.conf(5) man page.

How hard would it be to use two different ports for the simultaneous requests (as at least OS X does)?  That would be the most compatible default.

Comment 3 Andreas Schwab 2010-06-10 08:28:23 UTC
Broken resolver then.

Comment 4 Chris Adams 2010-06-10 12:45:17 UTC
Did you even read what I wrote before closing this?  The "broken resolver" is Linux doing something that no other OS does that is less compatible.  What happened to "be generous in what you accept and conservative in what you send"?

Also, there is a definite documentation bug in that the "options single-request" configuration is not documented anywhere that I could find.

Comment 5 Andreas Schwab 2010-06-10 12:59:54 UTC
resolv.conf(5) is part of man-pages.  Please open a separate bug.

Note You need to log in before you can comment on or make changes to this bug.