summaryrefslogtreecommitdiff
path: root/clientname.c
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2002-01-25 02:45:09 +0000
committerMartin Pool <mbp@samba.org>2002-01-25 02:45:09 +0000
commit6780f7200009a2b2603cee8f808170a93600891a (patch)
tree69a4af5b0a6ee5388fda2339d3d6cd26533130be /clientname.c
parent39e01d2d4b4bc1f86f30e7a02d7b2b1141b79c56 (diff)
downloadrsync-6780f7200009a2b2603cee8f808170a93600891a.tar.gz
rsync-6780f7200009a2b2603cee8f808170a93600891a.tar.bz2
rsync-6780f7200009a2b2603cee8f808170a93600891a.zip
Add code to compare sin6_addrs.v2.5.2pre3
Diffstat (limited to 'clientname.c')
-rw-r--r--clientname.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/clientname.c b/clientname.c
index 7a250481..579089f9 100644
--- a/clientname.c
+++ b/clientname.c
@@ -200,12 +200,18 @@ int compare_addrinfo_sockaddr(const struct addrinfo *ai,
sin1 = (const struct sockaddr_in *) ss;
sin2 = (const struct sockaddr_in *) ai->ai_addr;
- return memcmp(&sin1->sin_addr, &sin2->sin_addr, sizeof sin1->sin_addr);
+ return memcmp(&sin1->sin_addr, &sin2->sin_addr,
+ sizeof sin1->sin_addr);
}
#ifdef INET6
else if (ss_family == AF_INET6) {
- /* XXXX */
- return 1;
+ const struct sockaddr_in6 *sin1, *sin2;
+
+ sin1 = (const struct sockaddr_in6 *) ss;
+ sin2 = (const struct sockaddr_in6 *) ai->ai_addr;
+
+ return memcmp(&sin1->sin6_addr, &sin2->sin6_addr,
+ sizeof sin1->sin6_addr);
}
#endif /* INET6 */
else {