aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-03-06 14:53:08 +0000
committerUlrich Drepper <drepper@redhat.com>2007-03-06 14:53:08 +0000
commit6bf4a686f5a8fc2df9b3406fe3954c224a3846ba (patch)
tree0de1757e0d0a62000bc706bd65e177f5d898fdcc /sysdeps
parent0b3b1a0ce81276e92b25f71a11602ae1dd014015 (diff)
downloadglibc-6bf4a686f5a8fc2df9b3406fe3954c224a3846ba.zip
glibc-6bf4a686f5a8fc2df9b3406fe3954c224a3846ba.tar.gz
glibc-6bf4a686f5a8fc2df9b3406fe3954c224a3846ba.tar.bz2
* sysdeps/posix/getaddrinfo.c (get_scope): Correct test for
172.16/12 address range.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/posix/getaddrinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index b496685..da48d46 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -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