Fixed our supplied getnameinfo()'s ability to do a reverse lookup,

as reported in bug 5851.
This commit is contained in:
Wayne Davison committed 2008-10-25 09:21:13 -07:00
1 parent b3347e2a03
commit 9ddc2b64da
1 file changed
+3 -6
+3 -6
View File
@@ -492,13 +492,10 @@ int getnameinfo(const struct sockaddr *sa, socklen_t salen,
return EAI_FAIL;
}
/* We don't support those. */
if ((node && !(flags & NI_NUMERICHOST))
|| (service && !(flags & NI_NUMERICSERV)))
return EAI_FAIL;
if (node) {
return gethostnameinfo(sa, node, nodelen, flags);
int ret = gethostnameinfo(sa, node, nodelen, flags);
if (ret)
return ret;
}
if (service) {