From 8e1cfd4c4d2de3b34fe97c091a6175ec0e488561 Mon Sep 17 00:00:00 2001 From: Jun-ichiro itojun Hagino Date: Tue, 7 Aug 2001 00:40:51 +0000 Subject: for AF_INET6, must compare sin6_scope_id. --- lib/libc/net/net_addrcmp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') 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, -- cgit v1.2.3