Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3347e2
)
Fixed our supplied getnameinfo()'s ability to do a reverse lookup,
author
Wayne Davison
<wayned@samba.org>
Sat, 25 Oct 2008 15:39:41 +0000
(08:39 -0700)
committer
Wayne Davison
<wayned@samba.org>
Sat, 25 Oct 2008 16:21:13 +0000
(09:21 -0700)
as reported in bug 5851.
lib/getaddrinfo.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/getaddrinfo.c
b/lib/getaddrinfo.c
index
0261f78
..
b743287
100644
(file)
--- a/
lib/getaddrinfo.c
+++ b/
lib/getaddrinfo.c
@@
-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) {