From: Mark Andrews Date: Thu, 3 Feb 2011 08:16:30 +0000 (+0000) Subject: 3015. [port] win32: fix IN6_IS_ADDR_LINKLOCAL and X-Git-Tag: v9.8.0rc1~19 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=3f07721e3aaddd19aa074b52c2fbf6c6c8f7d6ab;p=thirdparty%2Fbind9.git 3015. [port] win32: fix IN6_IS_ADDR_LINKLOCAL and IN6_IS_ADDR_SITELOCAL macros. [RT #22724] --- diff --git a/CHANGES b/CHANGES index a50f8c50669..b11450b45b2 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] + 3013. [bug] The DNS64 ttl was not always being set as expected. [RT #23034] diff --git a/lib/isc/win32/include/isc/ipv6.h b/lib/isc/win32/include/isc/ipv6.h index c9add0b3794..a96e75e32ad 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.814.1 2011/02/03 08:16:30 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 */