mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +00:00
924. [port] Extend pre-RFC2133 support. [RT #987]
This commit is contained in:
parent
de18d9daa6
commit
9d99e3fda1
3
CHANGES
3
CHANGES
@ -1,5 +1,4 @@
|
||||
|
||||
924. [port] Apply #910 to lib/lwres. [RT #987]
|
||||
924. [port] Extend pre-RFC2133 support. [RT #987]
|
||||
|
||||
923. [bug] Multiline TSIG secrets (and other multiline strings)
|
||||
were not accepted in named.conf. [RT #1469]
|
||||
|
@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: net.h,v 1.29 2001/06/25 03:56:58 marka Exp $ */
|
||||
/* $Id: net.h,v 1.30 2001/07/09 08:07:41 marka Exp $ */
|
||||
|
||||
#ifndef ISC_NET_H
|
||||
#define ISC_NET_H 1
|
||||
@ -95,6 +95,7 @@
|
||||
#define in6_addr in_addr6 /* Required for pre RFC2133 implementations. */
|
||||
#endif
|
||||
|
||||
#ifdef ISC_PLATFORM_HAVEIPV6
|
||||
/*
|
||||
* Required for some pre RFC2133 implementations.
|
||||
* IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT were added in
|
||||
@ -118,6 +119,29 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef IN6_IS_ADDR_V4MAPPED
|
||||
#define IN6_IS_ADDR_V4MAPPED(x) \
|
||||
(memcmp((x)->s6_addr, in6addr_any.s6_addr, 10) == 0 && \
|
||||
(x)->s6_addr[10] == 0xff && (x)->s6_addr[11] == 0xff)
|
||||
#endif
|
||||
|
||||
#ifndef IN6_IS_ADDR_V4COMPAT
|
||||
#define IN6_IS_ADDR_V4COMPAT(x) \
|
||||
(memcmp((x)->s6_addr, in6addr_any.s6_addr, 12) == 0 && \
|
||||
((x)->s6_addr[12] != 0 || (x)->s6_addr[13] != 0 || \
|
||||
(x)->s6_addr[14] != 0 || \
|
||||
((x)->s6_addr[15] != 0 && (x)->s6_addr[15] != 1)))
|
||||
#endif
|
||||
|
||||
#ifndef IN6_IS_ADDR_MULTICAST
|
||||
#define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr[0] == 0xff)
|
||||
#endif
|
||||
|
||||
#ifndef IN6_IS_ADDR_LOOPBACK
|
||||
#define IN6_IS_ADDR_LOOPBACK(a) IN6_IS_ADDR_EQUAL(a, &in6addr_loopback)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef AF_INET6
|
||||
#define AF_INET6 99
|
||||
#endif
|
||||
@ -138,11 +162,13 @@ struct in6_pktinfo {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Cope with a missing in6addr_any.
|
||||
* Cope with a missing in6addr_any and in6addr_loopback.
|
||||
*/
|
||||
#if defined(ISC_PLATFORM_HAVEIPV6) && defined(ISC_PLATFORM_NEEDIN6ADDRANY)
|
||||
extern const struct in6_addr isc_net_in6addrany;
|
||||
#define in6addr_any isc_net_in6addrany
|
||||
extern const struct in6_addr isc_net_in6addrloop;
|
||||
#define in6addr_loopback isc_net_in6addrloop
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: net.c,v 1.20 2001/03/24 02:18:42 gson Exp $ */
|
||||
/* $Id: net.c,v 1.21 2001/07/09 08:07:40 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
|
||||
#if defined(ISC_PLATFORM_HAVEIPV6) && defined(ISC_PLATFORM_NEEDIN6ADDRANY)
|
||||
const struct in6_addr isc_net_in6addrany = IN6ADDR_ANY_INIT;
|
||||
const struct in6_addr isc_net_in6addrloop = IN6ADDR_LOOPBACK_INIT;
|
||||
#endif
|
||||
|
||||
static isc_once_t once = ISC_ONCE_INIT;
|
||||
|
Loading…
x
Reference in New Issue
Block a user