[Patch] [BZ 14505] Avoid unwanted A lookups on IPV6 only host
Roland McGrath
roland@hack.frob.com
Tue Aug 21 22:06:00 GMT 2012
Seems simpler to test "&& req->ai_family == PF_UNSPEC".
Also, you shouldn't call __nss_lookup_function at all when
you're not going to use its result. So make it:
nss_gethostbyname4_r fct4 = NULL;
/* comment */
if (req->ai_family == PF_UNSPEC)
fct4 = __nss_lookup_function (nip, "gethostbyname4_r");
if (fct4 != NULL)
Thanks,
Roland
More information about the Libc-alpha
mailing list