Skip to content

Commit

Permalink
* sysdeps/posix/getaddrinfo.c (getaddrinfo): Fix test for
Browse files Browse the repository at this point in the history
	temporary or deprecated addresses.
	Patch by Sridhar Samudrala <sri@us.ibm.com>.
  • Loading branch information
Ulrich Drepper committed Nov 9, 2006
1 parent 2f334ad commit 1c632ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
2006-11-09 Ulrich Drepper <drepper@redhat.com>

* sysdeps/posix/getaddrinfo.c (getaddrinfo): Fix test for
temporary or deprecated addresses.
Patch by Sridhar Samudrala <sri@us.ibm.com>.

* string/Makefile (tests): Add tst-strxfrm2.
* string/tst-strxfrm2.c: New file.

Expand Down
8 changes: 5 additions & 3 deletions sysdeps/posix/getaddrinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 1c632ce

Please sign in to comment.