Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/dist/bind/include Pull up revision 1.5 (requested by it...
details: https://anonhg.NetBSD.org/src/rev/445af4d7e3f6
branches: netbsd-1-6
changeset: 528175:445af4d7e3f6
user: lukem <lukem%NetBSD.org@localhost>
date: Fri Jun 28 11:39:52 2002 +0000
description:
Pull up revision 1.5 (requested by itojun in ticket #387):
Update to BIND 8.3.3. Fixes buffer overrun in resolver code.
diffstat:
dist/bind/include/port_after.h | 129 +++++++++++++++++++++++++++++++++++++++-
dist/bind/include/port_before.h | 12 +++-
2 files changed, 138 insertions(+), 3 deletions(-)
diffs (192 lines):
diff -r 00a2d97f435c -r 445af4d7e3f6 dist/bind/include/port_after.h
--- a/dist/bind/include/port_after.h Fri Jun 28 11:39:43 2002 +0000
+++ b/dist/bind/include/port_after.h Fri Jun 28 11:39:52 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: port_after.h,v 1.4 2001/05/17 22:59:41 itojun Exp $ */
+/* $NetBSD: port_after.h,v 1.4.2.1 2002/06/28 11:39:52 lukem Exp $ */
#ifndef PORT_AFTER_H
#define PORT_AFTER_H
@@ -20,7 +20,6 @@
#define HAVE_CHROOT
#define CAN_CHANGE_ID
#define __BIND_RES_TEXT
-#define MISSING_IN6ADDR_ANY
#define _TIMEZONE timezone
@@ -37,6 +36,10 @@
#if (!defined(BSD)) || (BSD < 199306)
#include <sys/bitypes.h>
#endif
+#include <netinet/in.h>
+#ifdef __KAME__
+#define HAS_INET6_STRUCTS
+#endif
#include <sys/time.h>
/*
@@ -76,7 +79,122 @@
struct in6_addr sin6_addr; /* IPv6 address */
u_int32_t sin6_scope_id; /* set of interfaces for a scope */
};
+
+#ifndef IN6ADDR_ANY_INIT
+#define IN6ADDR_ANY_INIT {{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}
+#endif
+#ifndef IN6ADDR_LOOPBACK_INIT
+#define IN6ADDR_LOOPBACK_INIT {{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}}
+#endif
#endif /* HAS_INET6_STRUCTS */
+
+
+#if defined(NEED_SOCKADDR_STORAGE) || !defined(HAS_INET6_STRUCTS)
+#define __SS_MAXSIZE 128
+#define __SS_ALLIGSIZE (sizeof (long))
+
+struct sockaddr_storage {
+#ifdef HAVE_SA_LEN
+ u_int8_t ss_len; /* address length */
+ u_int8_t ss_family; /* address family */
+ char __ss_pad1[__SS_ALLIGSIZE - 2 * sizeof(u_int8_t)];
+ long __ss_align;
+ char __ss_pad2[__SS_MAXSIZE - 2 * __SS_ALLIGSIZE];
+#else
+ u_int16_t ss_family; /* address family */
+ char __ss_pad1[__SS_ALLIGSIZE - sizeof(u_int16_t)];
+ long __ss_align;
+ char __ss_pad2[__SS_MAXSIZE - 2 * __SS_ALLIGSIZE];
+#endif
+};
+#endif
+
+#if !defined(HAS_INET6_STRUCTS) || defined(NEED_IN6ADDR_ANY)
+#define in6addr_any isc_in6addr_any
+extern const struct in6_addr in6addr_any;
+#endif
+
+#ifndef IN6_ARE_ADDR_EQUAL
+#define IN6_ARE_ADDR_EQUAL(a,b) \
+ (memcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof(struct in6_addr)) == 0)
+#endif
+
+#ifndef IN6_IS_ADDR_UNSPECIFIED
+#define IN6_IS_ADDR_UNSPECIFIED(a) \
+ IN6_ARE_ADDR_EQUAL(a, &in6addr_any)
+#endif
+
+#ifndef IN6_IS_ADDR_LOOPBACK
+extern const struct in6_addr isc_in6addr_loopback;
+#define IN6_IS_ADDR_LOOPBACK(a) \
+ IN6_ARE_ADDR_EQUAL(a, &isc_in6addr_loopback)
+#endif
+
+#ifndef IN6_IS_ADDR_V4COMPAT
+#define IN6_IS_ADDR_V4COMPAT(a) \
+ ((a)->s6_addr[0] == 0x00 && (a)->s6_addr[1] == 0x00 && \
+ (a)->s6_addr[2] == 0x00 && (a)->s6_addr[3] == 0x00 && \
+ (a)->s6_addr[4] == 0x00 && (a)->s6_addr[5] == 0x00 && \
+ (a)->s6_addr[6] == 0x00 && (a)->s6_addr[7] == 0x00 && \
+ (a)->s6_addr[8] == 0x00 && (a)->s6_addr[9] == 0x00 && \
+ (a)->s6_addr[10] == 0x00 && (a)->s6_addr[11] == 0x00 && \
+ ((a)->s6_addr[12] != 0x00 || (a)->s6_addr[13] != 0x00 || \
+ (a)->s6_addr[14] != 0x00 || \
+ ((a)->s6_addr[15] != 0x00 && (a)->s6_addr[15] != 1)))
+#endif
+
+#ifndef IN6_IS_ADDR_V4MAPPED
+#define IN6_IS_ADDR_V4MAPPED(a) \
+ ((a)->s6_addr[0] == 0x00 && (a)->s6_addr[1] == 0x00 && \
+ (a)->s6_addr[2] == 0x00 && (a)->s6_addr[3] == 0x00 && \
+ (a)->s6_addr[4] == 0x00 && (a)->s6_addr[5] == 0x00 && \
+ (a)->s6_addr[6] == 0x00 && (a)->s6_addr[7] == 0x00 && \
+ (a)->s6_addr[8] == 0x00 && (a)->s6_addr[9] == 0x00 && \
+ (a)->s6_addr[10] == 0xff && (a)->s6_addr[11] == 0xff)
+#endif
+
+#ifndef IN6_IS_ADDR_SITELOCAL
+#define IN6_IS_ADDR_SITELOCAL(a) \
+ (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0))
+#endif
+
+#ifndef IN6_IS_ADDR_LINKLOCAL
+#define IN6_IS_ADDR_LINKLOCAL(a) \
+ (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80))
+#endif
+
+#ifndef IN6_IS_ADDR_MULTICAST
+#define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr[0] == 0xff)
+#endif
+
+#ifndef __IPV6_ADDR_MC_SCOPE
+#define __IPV6_ADDR_MC_SCOPE(a) ((a)->s6_addr[1] & 0x0f)
+#endif
+
+#ifndef __IPV6_ADDR_SCOPE_SITELOCAL
+#define __IPV6_ADDR_SCOPE_SITELOCAL 0x05
+#endif
+
+#ifndef __IPV6_ADDR_SCOPE_ORGLOCAL
+#define __IPV6_ADDR_SCOPE_ORGLOCAL 0x08
+#endif
+
+#ifndef IN6_IS_ADDR_MC_SITELOCAL
+#define IN6_IS_ADDR_MC_SITELOCAL(a) \
+ (IN6_IS_ADDR_MULTICAST(a) && \
+ (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_SITELOCAL))
+#endif
+
+#ifndef IN6_IS_ADDR_MC_ORGLOCAL
+#define IN6_IS_ADDR_MC_ORGLOCAL(a) \
+ (IN6_IS_ADDR_MULTICAST(a) && \
+ (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_ORGLOCAL))
+#endif
+
+#ifndef INET6_ADDRSTRLEN
+#define INET6_ADDRSTRLEN 46
+#endif
+
#ifndef ISC_FACILITY
#define ISC_FACILITY LOG_DAEMON
#endif
@@ -84,4 +202,11 @@
int isc__gettimeofday(struct timeval *, struct timezone *);
#define gettimeofday isc__gettimeofday
+#define UNUSED(x) (x) = (x)
+#define DE_CONST(konst, var) \
+ do { \
+ union { const void *k; void *v; } _u; \
+ _u.k = konst; \
+ var = _u.v; \
+ } while (0)
#endif /* ! PORT_AFTER_H */
diff -r 00a2d97f435c -r 445af4d7e3f6 dist/bind/include/port_before.h
--- a/dist/bind/include/port_before.h Fri Jun 28 11:39:43 2002 +0000
+++ b/dist/bind/include/port_before.h Fri Jun 28 11:39:52 2002 +0000
@@ -1,14 +1,24 @@
-/* $NetBSD: port_before.h,v 1.4 2001/01/27 07:22:02 itojun Exp $ */
+/* $NetBSD: port_before.h,v 1.4.2.1 2002/06/28 11:40:02 lukem Exp $ */
#if 0
#define WANT_IRS_NIS
#define WANT_IRS_PW
+#define HAVE_PW_CLASS
#define WANT_IRS_GR
#endif
#define SIG_FN void
+#define ISC_SOCKLEN_T int
#if defined(HAS_PTHREADS) && defined(_REENTRANT)
#define DO_PTHREADS
#endif
#define SETGRENT_VOID
#define SETPWENT_VOID
+#define GETGROUPLIST_ARGS const char *name, gid_t basegid, gid_t *groups, \
+ int *ngroups
+#ifdef __GNUC__
+#define ISC_FORMAT_PRINTF(fmt, args) \
+ __attribute__((__format__(__printf__, fmt, args)))
+#else
+#define ISC_FORMAT_PRINTF(fmt, args)
+#endif
Home |
Main Index |
Thread Index |
Old Index