Skip to contentSkip to conversation

resolv.conf.5 add "single-request-reopen" option

PATCH In review Todd Lewis 1 participant 2 messages Sep 11, 2012 1 message not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore

Todd Lewis

author
#0 lore raw

PATCH 1/1 resolv.conf.5 add "single-request-reopen" option

The attached "diff -u" formatted patch applies to
http://git.kernel.org/?p=docs/man-pages/man-pages.git;a=blob_plain;f=man5/resolv.conf.5;hb=HEAD
as it existed on 2012-09-11--14:31.

It adds documentation for the "single-request-reopen" option. This information was found in the changelog notes
(http://sourceware.org/ml/libc-alpha/2009-10/msg00063.html) from Ulrich Drepper. The issue and solution were both brought to my attention by a discussion on our internal mailing list which mentioned this undocumented feature. Several users indicated they have been suffering from slow DNS resolutions on machines behind certain firewalls and that this solved their problems. Seems like others would like to know about it.

Signature · 4 lines
   +--------------------------------------------------------------+
  / [email protected]  919-445-0091  http://www.unc.edu/~utoddl /
 /               Honk if you love peace and quiet.              /
+--------------------------------------------------------------+
tmp/man5_resolv.conf.5 renamed from tmp/man5_resolv.conf.5-orig +6 -0
@@ -168,6 +168,12 @@
 (currently 2, see \fI<resolv.h>\fP).
 The value for this option is silently capped to 5.
 .TP
+.BR single-request-reopen " (since glibc 2.11)"
+closes the socket and opens a new one before sending a second DNS lookup
+if the first one is not handled correctly. This greatly speeds up lookups
+in broken DNS environments that would otherwise await timeouts before
+rediscovering the need to reset connections in every process. 
+.TP
 .B rotate
 .\" Since glibc 2.2
 sets

A message that is not in the archive (sent off-list or not yet received): 504F8488.6030900-vEoVa6Jh+/J4piUD7e9S/[email protected]

author
#2 lore raw

Well, this is embarrassing. It turns out RedHat has this documented in their RHEL series, but not in Fedora. It's also not in the man-pages project. The attached patch has a better explanation of the option than the one I submitted earlier today. This text comes from RedHat.

On 09/11/2012 02:35 PM, Todd Lewis sent:

Quoted 12 lines

The attached "diff -u" formatted patch applies to
http://git.kernel.org/?p=docs/man-pages/man-pages.git;a=blob_plain;f=man5/resolv.conf.5;hb=HEAD
as it existed on 2012-09-11--14:31.

It adds documentation for the "single-request-reopen" option. This information was found in the changelog notes
(http://sourceware.org/ml/libc-alpha/2009-10/msg00063.html) from Ulrich Drepper. The issue and solution were both brought to my attention by a discussion on our internal mailing list which mentioned this undocumented feature. Several users indicated they have been suffering from slow DNS resolutions on machines behind certain firewalls and that this solved their problems. Seems like others would like to know about it.

Signature · 4 lines
   +--------------------------------------------------------------+
  / [email protected]  919-445-0091  http://www.unc.edu/~utoddl /
 /   How many of you believe in telekinesis? Raise my hand...   /
+--------------------------------------------------------------+
tmp/man5_resolv.conf.5 renamed from tmp/man5_resolv.conf.5-orig +7 -0
@@ -168,6 +168,13 @@
 (currently 2, see \fI<resolv.h>\fP).
 The value for this option is silently capped to 5.
 .TP
+.BR single-request-reopen " (since glibc 2.9)"
+The resolver uses the same socket for the A and AAAA requests.  Some hardware
+mistakenly only sends back one reply.  When that happens the client sytem will
+sit and wait for the second reply.  Turning this option on changes this behavior
+so that if two requests from the same port are not handled correctly it will
+close the  socket and open a new one before sending the second request.
+.TP
 .B rotate
 .\" Since glibc 2.2
 sets