This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] [BZ #11438] getaddrinfo: map RFC 1918 addresses to global scope
- From: "Dmitry V. Levin" <ldv at altlinux dot org>
- To: libc-alpha at sourceware dot org
- Date: Tue, 18 Sep 2012 00:51:19 +0400
- Subject: [PATCH] [BZ #11438] getaddrinfo: map RFC 1918 addresses to global scope
Change RFC 1918 addresses mapping from site-local scope to global scope.
---
ChangeLog | 7 +++++++
posix/gai.conf | 7 ++-----
sysdeps/posix/getaddrinfo.c | 3 ---
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 358ea37..309a599 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-09-14 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 it.
+
2012-09-17 Joseph Myers <joseph@codesourcery.com>
* libio/iogetline.c [_LIBC || !_G_HAVE_IO_GETLINE_INFO]: Make code
diff --git a/posix/gai.conf b/posix/gai.conf
index 195287e..57a313d 100644
--- a/posix/gai.conf
+++ b/posix/gai.conf
@@ -55,16 +55,13 @@
#
# 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
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 05883bd..82c0b95 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -1370,9 +1370,6 @@ static const struct scopeentry
{ { { 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