From 0417821b024dfaff8772271bfe0af4358b71b6bc Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 3 Feb 2011 08:19:40 +0000 Subject: [PATCH] 3015. [port] win32: fix IN6_IS_ADDR_LINKLOCAL and IN6_IS_ADDR_SITELOCAL macros. [RT #22724] --- CHANGES | 3 +++ lib/isc/win32/include/isc/ipv6.h | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index a2ffa3f041..a25943663a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +3015. [port] win32: fix IN6_IS_ADDR_LINKLOCAL and + IN6_IS_ADDR_SITELOCAL macros. [RT #22724] + 3014. [bug] Fix the zonechecks system test to match expected behaviour for 9.6 and to fail on error. [RT #22905] diff --git a/lib/isc/win32/include/isc/ipv6.h b/lib/isc/win32/include/isc/ipv6.h index c9add0b379..73e18ebc5c 100644 --- a/lib/isc/win32/include/isc/ipv6.h +++ b/lib/isc/win32/include/isc/ipv6.h @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: ipv6.h,v 1.19 2007/06/18 23:47:49 tbox Exp $ */ +/* $Id: ipv6.h,v 1.19.332.1 2011/02/03 08:19:40 marka Exp $ */ #ifndef ISC_IPV6_H #define ISC_IPV6_H 1 @@ -111,14 +111,14 @@ LIBISC_EXTERNAL_DATA extern const struct in6_addr isc_in6addr_loopback; */ #ifndef IN6_IS_ADDR_LINKLOCAL #define IN6_IS_ADDR_LINKLOCAL(a) (\ -(*((u_long *)((a)->s6_addr) ) == 0xfe) && \ -((*((u_long *)((a)->s6_addr) + 1) & 0xc0) == 0x80)) + ((a)->s6_addr[0] == 0xfe) && \ + (((a)->s6_addr[1] & 0xc0) == 0x80)) #endif #ifndef IN6_IS_ADDR_SITELOCAL #define IN6_IS_ADDR_SITELOCAL(a) (\ -(*((u_long *)((a)->s6_addr) ) == 0xfe) && \ -((*((u_long *)((a)->s6_addr) + 1) & 0xc0) == 0xc0)) + ((a)->s6_addr[0] == 0xfe) && \ + (((a)->s6_addr[1] & 0xc0) == 0xc0)) #endif #endif /* ISC_IPV6_H */