summaryrefslogtreecommitdiff
path: root/sysdeps/posix/getaddrinfo.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-11-09 20:59:55 +0000
committerJakub Jelinek <jakub@redhat.com>2006-11-09 20:59:55 +0000
commit362d67883f1d8b55049f47b5d56e534f04be0b99 (patch)
tree3e78075972cacd915df7c943ec4cbe8e6c7a2737 /sysdeps/posix/getaddrinfo.c
parentbff4b406f7f47bb2aca83d90d8d886bfbc8ba447 (diff)
Updated to fedora-glibc-20061109T2048cvs/fedora-glibc-2_5_90-5
Diffstat (limited to 'sysdeps/posix/getaddrinfo.c')
-rw-r--r--sysdeps/posix/getaddrinfo.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 84a6293365..b4966852a7 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -2085,10 +2085,12 @@ getaddrinfo (const char *name, const char *service,
if (q->ai_family == PF_INET6 && in6ai != NULL)
{
- /* See whether the address is the list of deprecated
- or temporary addresses. */
+ /* See whether the source address is the list of
+ deprecated or temporary addresses. */
struct in6addrinfo tmp;
- memcpy (tmp.addr, q->ai_addr, IN6ADDRSZ);
+ struct sockaddr_in6 *sin6p
+ = (struct sockaddr_in6 *) &results[i].source_addr;
+ memcpy (tmp.addr, &sin6p->sin6_addr, IN6ADDRSZ);
struct in6addrinfo *found
= bsearch (&tmp, in6ai, in6ailen, sizeof (*in6ai),