From 6cc0b1233e8bc9a2027b9ea3b48e52e9aefd208d Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Thu, 22 Apr 2010 03:19:34 +0000 Subject: [PATCH] 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 --- src/lib/krb5/os/changepw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.26.2