This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug network/14307] getaddrinfo() sends superfluous DNS requests in x86_64 programs for certain hostnames


http://sourceware.org/bugzilla/show_bug.cgi?id=14307

--- Comment #3 from Jeroen van Bemmel <jvb127 at gmail dot com> 2012-06-30 02:23:01 UTC ---
(In reply to comment #2)
> Reproducible on HEAD.
> 
> The size of the response is what seems to be causing the second query -- 6 or
> more seems to be the trigger. My initial guess was that the first lookup led to
> an ERANGE internally, resulting in the second query, but that should have
> happened for 32-bit as well. So this might well be something else. This has
> nothing to do with whether there is a CNAME in the response.

You are correct that __gethostbyname2_r in sysdeps/posix/getaddrinfo.c returns
ERANGE the first time when using a 512-byte buffer, in 64-bit mode. It is then
retried with a 1024-byte buffer, and the call succeeds

However, the same call in 32-bit mode also uses a 512-byte buffer, and does not
return ERANGE.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]