From: Greg Hudson Date: Thu, 22 Apr 2010 03:19:34 +0000 (+0000) Subject: In kpasswd_sendto_msg_callback(), properly compare against the X-Git-Tag: krb5-1.9-beta1~274 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6cc0b1233e8bc9a2027b9ea3b48e52e9aefd208d;p=krb5.git In kpasswd_sendto_msg_callback(), properly compare against the wildcard IPv6 address instead of comparing an array address to 0. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23921 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/changepw.c b/src/lib/krb5/os/changepw.c index 7cab0d63d..25840b6d5 100644 --- a/src/lib/krb5/os/changepw.c +++ b/src/lib/krb5/os/changepw.c @@ -140,7 +140,8 @@ kpasswd_sendto_msg_callback(struct conn_state *conn, local_kaddr.length = sizeof(ss2sin(&local_addr)->sin_addr); local_kaddr.contents = (krb5_octet *) &ss2sin(&local_addr)->sin_addr; } else if (local_addr.ss_family == AF_INET6 && - ss2sin6(&local_addr)->sin6_addr.s6_addr != 0) { + memcmp(ss2sin6(&local_addr)->sin6_addr.s6_addr, + in6addr_any.s6_addr, sizeof(in6addr_any.s6_addr)) != 0) { local_kaddr.addrtype = ADDRTYPE_INET6; local_kaddr.length = sizeof(ss2sin6(&local_addr)->sin6_addr); local_kaddr.contents = (krb5_octet *) &ss2sin6(&local_addr)->sin6_addr;