diff options
author | Jeff Law <law@redhat.com> | 2012-09-28 10:15:05 -0600 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 2012-09-28 10:15:05 -0600 |
commit | 115411772b189e9e41a97618816edd66f0a9a620 (patch) | |
tree | 9b369d4cf5223eb0b4a855381d0ae37f4964b129 /posix | |
parent | 8cf6a02e77b49f24640d6c255e6148d941314f06 (diff) | |
download | glibc-115411772b189e9e41a97618816edd66f0a9a620.tar.gz |
[BZ #11438]
* sysdeps/posix/getaddrinfo.c (default_scopes): Map RFC 1918
* addresses
to global scope.
* posix/tst-rfc3484.c: Verify 10/8, 172.16/12 and 196.128/16
addresses are in the same scope as 192.0.2/24.
* posix/gai.conf: Document new scope table defaults.
Diffstat (limited to 'posix')
-rw-r--r-- | posix/gai.conf | 16 | ||||
-rw-r--r-- | posix/tst-rfc3484.c | 5 |
2 files changed, 6 insertions, 15 deletions
diff --git a/posix/gai.conf b/posix/gai.conf index 195287e1c8..4616ed005b 100644 --- a/posix/gai.conf +++ b/posix/gai.conf @@ -55,23 +55,11 @@ # # scopev4 <mask> <value> -# Add another rule to the RFC 3484 scope table for IPv4 addresses. -# By default the scope IDs described in section 3.2 in RFC 3484 are +# Add another rule to the RFC 6724 scope table for IPv4 addresses. +# By default the scope IDs described in section 3.2 in RFC 6724 are # used. Changing these defaults should hardly ever be necessary. # The defaults are equivalent to: # #scopev4 ::ffff:169.254.0.0/112 2 #scopev4 ::ffff:127.0.0.0/104 2 -#scopev4 ::ffff:10.0.0.0/104 5 -#scopev4 ::ffff:172.16.0.0/108 5 -#scopev4 ::ffff:192.168.0.0/112 5 -#scopev4 ::ffff:0.0.0.0/96 14 -# -# For sites which use site-local IPv4 addresses behind NAT there is -# the problem that even if IPv4 addresses are preferred they do not -# have the same scope and are therefore not sorted first. To change -# this use only these rules: -# -#scopev4 ::ffff:169.254.0.0/112 2 -#scopev4 ::ffff:127.0.0.0/104 2 #scopev4 ::ffff:0.0.0.0/96 14 diff --git a/posix/tst-rfc3484.c b/posix/tst-rfc3484.c index 29e1461e11..db3ae1b7bb 100644 --- a/posix/tst-rfc3484.c +++ b/posix/tst-rfc3484.c @@ -71,6 +71,9 @@ service_user *__nss_hosts_database attribute_hidden; struct sockaddr_in addrs[] = { + { .sin_family = AF_INET, .sin_addr = { h (0x0aa85f19) } }, + { .sin_family = AF_INET, .sin_addr = { h (0xac105f19) } }, + { .sin_family = AF_INET, .sin_addr = { h (0xc0000219) } }, { .sin_family = AF_INET, .sin_addr = { h (0xc0a86d1d) } }, { .sin_family = AF_INET, .sin_addr = { h (0xc0a85d03) } }, { .sin_family = AF_INET, .sin_addr = { h (0xc0a82c3d) } }, @@ -86,7 +89,7 @@ static size_t order[naddrs]; static int expected[naddrs] = { - 6, 1, 0, 3, 2, 4, 5 + 9, 4, 3, 6, 5, 7, 8, 2, 0, 1 }; |