This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH v3] [BZ #11438] getaddrinfo: map RFC 1918 addresses to global scope
Change RFC 1918 addresses mapping from site-local scope to global scope.
---
This time with the NEWS entry updated.
ChangeLog | 7 +++++++
NEWS | 6 +++---
posix/gai.conf | 16 ++--------------
sysdeps/posix/getaddrinfo.c | 4 ----
4 files changed, 12 insertions(+), 21 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index bb46639..a5bef90 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-09-17 Dmitry V. Levin <ldv@altlinux.org>
+
+ [BZ #11438]
+ * sysdeps/posix/getaddrinfo.c (default_scopes): Map RFC 1918 addresses
+ to global scope.
+ * posix/gai.conf: Document new scope table defaults.
+
2012-09-17 Chris Metcalf <cmetcalf@tilera.com>
* crypt/md5test-giant.c (TIMEOUT): Increase to 8 minutes for tilegx.
diff --git a/NEWS b/NEWS
index adcb741..791fb30 100644
--- a/NEWS
+++ b/NEWS
@@ -9,12 +9,12 @@ Version 2.17
* The following bugs are resolved with this release:
- 1349, 3479, 5400, 6778, 6808, 9685, 9914, 10014, 10038, 11607, 13412,
- 13542, 13717, 13696, 13939, 13966, 14042, 14090, 14166, 14150, 14151,
+ 1349, 3479, 5400, 6778, 6808, 9685, 9914, 10014, 10038, 11438, 11607,
+ 13412, 13542, 13696, 13717, 13939, 13966, 14042, 14090, 14150, 14151,
14154, 14157, 14166, 14173, 14195, 14237, 14252, 14283, 14298, 14303,
14307, 14328, 14331, 14336, 14337, 14347, 14349, 14459, 14476, 14505,
14510, 14516, 14518, 14519, 14532, 14538, 14544, 14545, 14576, 14583,
- 14587
+ 14587.
* Support for STT_GNU_IFUNC symbols added for s390 and s390x.
Optimized versions of memcpy, memset, and memcmp added for System z10 and
diff --git a/posix/gai.conf b/posix/gai.conf
index 195287e..4616ed0 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/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 05883bd..672571e 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -1369,10 +1369,6 @@ static const struct scopeentry
/* Link-local addresses: scope 2. */
{ { { 169, 254, 0, 0 } }, htonl_c (0xffff0000), 2 },
{ { { 127, 0, 0, 0 } }, htonl_c (0xff000000), 2 },
- /* Site-local addresses: scope 5. */
- { { { 10, 0, 0, 0 } }, htonl_c (0xff000000), 5 },
- { { { 172, 16, 0, 0 } }, htonl_c (0xfff00000), 5 },
- { { { 192, 168, 0, 0 } }, htonl_c (0xffff0000), 5 },
/* Default: scope 14. */
{ { { 0, 0, 0, 0 } }, htonl_c (0x00000000), 14 }
};
--
ldv