summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2001-08-07 00:40:51 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2001-08-07 00:40:51 +0000
commit8e1cfd4c4d2de3b34fe97c091a6175ec0e488561 (patch)
tree90dc0bf4cdbc88bb7689115a1baa22769a75e118
parent50cd9141935cf746d56a55e4b668d4e280e2be3c (diff)
for AF_INET6, must compare sin6_scope_id.
-rw-r--r--lib/libc/net/net_addrcmp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/net/net_addrcmp.c b/lib/libc/net/net_addrcmp.c
index 64b3dce57df..7d1a67ee084 100644
--- a/lib/libc/net/net_addrcmp.c
+++ b/lib/libc/net/net_addrcmp.c
@@ -23,7 +23,9 @@ net_addrcmp(sa1, sa2)
case AF_INET6:
return (memcmp(&((struct sockaddr_in6 *)sa1)->sin6_addr,
&((struct sockaddr_in6 *)sa2)->sin6_addr,
- sizeof(struct in6_addr)));
+ sizeof(struct in6_addr)) == 0 &&
+ ((struct sockaddr_in6 *)sa1)->sin6_scope_id ==
+ ((struct sockaddr_in6 *)sa2)->sin6_scpoe_id);
case AF_NS:
return (memcmp(&((struct sockaddr_ns *)sa1)->sns_addr,
&((struct sockaddr_ns *)sa2)->sns_addr,