mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-23 03:10:05 +00:00
* sysdeps/posix/getaddrinfo.c (get_scope): Loopback addresses have
to be treated like link-local addresses.
This commit is contained in:
parent
1f0398248c
commit
5fab55441c
@ -1,5 +1,8 @@
|
|||||||
2008-05-14 Ulrich Drepper <drepper@redhat.com>
|
2008-05-14 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/posix/getaddrinfo.c (get_scope): Loopback addresses have
|
||||||
|
to be treated like link-local addresses.
|
||||||
|
|
||||||
* sysdeps/posix/getaddrinfo.c (getaddrinfo): Add _res_hconf_init
|
* sysdeps/posix/getaddrinfo.c (getaddrinfo): Add _res_hconf_init
|
||||||
if necessary.
|
if necessary.
|
||||||
|
|
||||||
|
@ -1112,7 +1112,10 @@ get_scope (const struct sockaddr_in6 *in6)
|
|||||||
{
|
{
|
||||||
if (! IN6_IS_ADDR_MULTICAST (&in6->sin6_addr))
|
if (! IN6_IS_ADDR_MULTICAST (&in6->sin6_addr))
|
||||||
{
|
{
|
||||||
if (IN6_IS_ADDR_LINKLOCAL (&in6->sin6_addr))
|
if (IN6_IS_ADDR_LINKLOCAL (&in6->sin6_addr)
|
||||||
|
/* RFC 4291 2.5.3 says that the loopback address is to be
|
||||||
|
treated like a link-local address. */
|
||||||
|
|| IN6_IS_ADDR_LOOPBACK (&in6->sin6_addr))
|
||||||
scope = 2;
|
scope = 2;
|
||||||
else if (IN6_IS_ADDR_SITELOCAL (&in6->sin6_addr))
|
else if (IN6_IS_ADDR_SITELOCAL (&in6->sin6_addr))
|
||||||
scope = 5;
|
scope = 5;
|
||||||
|
Loading…
Reference in New Issue
Block a user