]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
2007-03-06 Ulrich Drepper <drepper@redhat.com>
authorJakub Jelinek <jakub@redhat.com>
Thu, 12 Jul 2007 14:58:16 +0000 (14:58 +0000)
committerJakub Jelinek <jakub@redhat.com>
Thu, 12 Jul 2007 14:58:16 +0000 (14:58 +0000)
* sysdeps/posix/getaddrinfo.c (get_scope): Correct test for
172.16/12 address range.

ChangeLog
sysdeps/posix/getaddrinfo.c

index 8b32d0ae82d411bab24b280d354994007a2aaa00..823115c96ee455a99882671f0d7f7b2a86555c11 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-03-06  Ulrich Drepper  <drepper@redhat.com>
+
+       * sysdeps/posix/getaddrinfo.c (get_scope): Correct test for
+       172.16/12 address range.
+
 2007-03-01  Jakub Jelinek  <jakub@redhat.com>
 
        [BZ #4069]
index 84a6293365be127c48d3f532233d2dd0f929baa8..e6bda05439120ea3391cbfc42de83a227f807f86 100644 (file)
@@ -1157,7 +1157,7 @@ get_scope (const struct sockaddr_storage *ss)
         169.254/16 and 127/8 are link-local.  */
       if ((addr[0] == 169 && addr[1] == 254) || addr[0] == 127)
        scope = 2;
-      else if (addr[0] == 10 || (addr[0] == 172 && addr[1] == 16)
+      else if (addr[0] == 10 || (addr[0] == 172 && (addr[1] & 0xf0) == 16)
               || (addr[0] == 192 && addr[1] == 168))
        scope = 5;
       else