From fc36d6fe22d1d9a05f5c49d2feaf57f692b3caff Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Fri, 21 Jun 2002 17:52:51 +0000 Subject: [PATCH] * mk_priv.c (krb4int_address_less): Put braces around v4mapped address processing to permit local variable declaration. Pass correct value to IN6_IS_ADDR_V4MAPPED. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14551 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb4/ChangeLog | 6 ++++++ src/lib/krb4/mk_priv.c | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog index faa69d7cf..0996826dc 100644 --- a/src/lib/krb4/ChangeLog +++ b/src/lib/krb4/ChangeLog @@ -1,3 +1,9 @@ +2002-06-21 Ken Raeburn + + * mk_priv.c (krb4int_address_less): Put braces around v4mapped + address processing to permit local variable declaration. Pass + correct value to IN6_IS_ADDR_V4MAPPED. + 2002-05-29 Ken Raeburn * DNR.c: Deleted. diff --git a/src/lib/krb4/mk_priv.c b/src/lib/krb4/mk_priv.c index 41a1a708f..471f7b73d 100644 --- a/src/lib/krb4/mk_priv.c +++ b/src/lib/krb4/mk_priv.c @@ -109,8 +109,9 @@ krb4int_address_less (struct sockaddr_in *sender, struct sockaddr_in *receiver) break; #ifdef KRB5_USE_INET6 case AF_INET6: + { struct sockaddr_in6 *s6 = (struct sockaddr_in6 *) sender; - if (IN6_IS_ADDR_V4MAPPED (s6)) { + if (IN6_IS_ADDR_V4MAPPED (&s6->sin6_addr)) { struct sockaddr_in sintmp = { 0 }; memcpy (&sintmp.sin_addr.s_addr, 12+(char*)&s6->sin6_addr.s6_addr, @@ -120,6 +121,7 @@ krb4int_address_less (struct sockaddr_in *sender, struct sockaddr_in *receiver) return -1; sender_port = s6->sin6_port; break; + } #endif default: return -1; @@ -131,8 +133,9 @@ krb4int_address_less (struct sockaddr_in *sender, struct sockaddr_in *receiver) break; #ifdef KRB5_USE_INET6 case AF_INET6: + { struct sockaddr_in6 *s6 = (struct sockaddr_in6 *) receiver; - if (IN6_IS_ADDR_V4MAPPED (s6)) { + if (IN6_IS_ADDR_V4MAPPED (&s6->sin6_addr)) { struct sockaddr_in sintmp = { 0 }; memcpy (&sintmp.sin_addr.s_addr, 12+(char*)&s6->sin6_addr.s6_addr, @@ -142,6 +145,7 @@ krb4int_address_less (struct sockaddr_in *sender, struct sockaddr_in *receiver) return -1; receiver_port = s6->sin6_port; break; + } #endif default: return -1; -- 2.26.2