+1950. [port] Solaris 2.5.1 and earlier cannot bind() then connect()
+ a TCP socket. This prevents the source address being
+ set for TCP connections. [RT #15628]
+
1949. [func] Addition memory leakage checks. [RT #15544]
1948. [bug] If was possible to trigger a REQUIRE failure in
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: config.h.in,v 1.75 2005/10/20 23:50:53 marka Exp $ */
+/* $Id: config.h.in,v 1.77 2006/01/05 00:30:34 marka Exp $ */
/*! \file */
/* Define if threads need PTHREAD_SCOPE_SYSTEM */
#undef NEED_PTHREAD_SCOPE_SYSTEM
+/* Define if you cannot bind() before connect() for TCP sockets. */
+#undef BROKEN_TCP_BIND_BEFORE_CONNECT
+
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
#! /bin/sh
-# Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1996-2003 Internet Software Consortium.
#
# Permission to use, copy, modify, and distribute this software for any
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
#
-# $Id: configure,v 1.385 2005/10/20 23:50:53 marka Exp $
+# $Id: configure,v 1.386 2006/01/04 04:15:55 marka Exp $
#
# Portions Copyright (C) 1996-2001 Nominum, Inc.
#
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-# From configure.in Revision: 1.396 .
+# From configure.in Revision: 1.397 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59.
#
;;
esac
#
+# Solaris 2.5.1 and earlier cannot bind() then connect() a TCP socket.
+# This prevents the source address being set.
+#
+case "$host" in
+*-solaris2.[012345]|*-solaris2.5.1)
+
+cat >>confdefs.h <<\_ACEOF
+#define BROKEN_TCP_BIND_BEFORE_CONNECT 1
+_ACEOF
+
+ ;;
+esac
+#
# The following sections deal with tools used for formatting
# the documentation. They are all optional, unless you are
# a developer editing the documentation source.
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl
-AC_REVISION($Revision: 1.396 $)
+AC_REVISION($Revision: 1.397 $)
AC_INIT(lib/dns/name.c)
AC_PREREQ(2.59)
;;
esac
#
+# Solaris 2.5.1 and earlier cannot bind() then connect() a TCP socket.
+# This prevents the source address being set.
+#
+case "$host" in
+*-solaris2.[[012345]]|*-solaris2.5.1)
+ AC_DEFINE(BROKEN_TCP_BIND_BEFORE_CONNECT, 1,
+ [Define if you cannot bind() before connect() for TCP sockets.])
+ ;;
+esac
+#
# The following sections deal with tools used for formatting
# the documentation. They are all optional, unless you are
# a developer editing the documentation source.
- PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- File: $Id: Bv9ARM-book.xml,v 1.284 2006/01/04 02:35:49 marka Exp $ -->
+<!-- File: $Id: Bv9ARM-book.xml,v 1.285 2006/01/04 04:14:39 marka Exp $ -->
<book xmlns:xi="http://www.w3.org/2001/XInclude">
<title>BIND 9 Administrator Reference Manual</title>
unprivileged port.
</para>
</note>
+ <note>
+ <para>
+ Solaris 2.5.1 and earlier does not support setting the source
+ address for TCP sockets.
+ </para>
+ </note>
<note>
<para>
See also <command>transfer-source</command> and
<command>zone</command> block in the configuration
file.
</para>
+ <note>
+ <para>
+ Solaris 2.5.1 and earlier does not support setting the
+ source address for TCP sockets.
+ </para>
+ </note>
</listitem>
</varlistentry>
<command>view</command> block in the configuration
file.
</para>
+ <note>
+ <para>
+ Solaris 2.5.1 and earlier does not support setting the
+ source address for TCP sockets.
+ </para>
+ </note>
</listitem>
</varlistentry>
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: request.c,v 1.74 2005/04/29 00:22:51 marka Exp $ */
+/* $Id: request.c,v 1.75 2006/01/04 04:14:39 marka Exp $ */
/*! \file */
isc_sockettype_tcp, &socket);
if (result != ISC_R_SUCCESS)
return (result);
+#ifndef BROKEN_TCP_BIND_BEFORE_CONNECT
if (srcaddr == NULL) {
isc_sockaddr_anyofpf(&bind_any,
isc_sockaddr_pf(destaddr));
}
if (result != ISC_R_SUCCESS)
goto cleanup;
+#endif
attrs = 0;
attrs |= DNS_DISPATCHATTR_TCP;
attrs |= DNS_DISPATCHATTR_PRIVATE;
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: resolver.c,v 1.323 2006/01/04 00:37:24 marka Exp $ */
+/* $Id: resolver.c,v 1.324 2006/01/04 04:14:39 marka Exp $ */
/*! \file */
if (result != ISC_R_SUCCESS)
goto cleanup_query;
+#ifndef BROKEN_TCP_BIND_BEFORE_CONNECT
result = isc_socket_bind(query->tcpsocket, &addr);
if (result != ISC_R_SUCCESS)
goto cleanup_socket;
+#endif
/*
* A dispatch will be created once the connect succeeds.
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: xfrin.c,v 1.143 2006/01/04 03:03:11 marka Exp $ */
+/* $Id: xfrin.c,v 1.144 2006/01/04 04:14:39 marka Exp $ */
/*! \file */
isc_sockaddr_pf(&xfr->sourceaddr),
isc_sockettype_tcp,
&xfr->socket));
+#ifndef BROKEN_TCP_BIND_BEFORE_CONNECT
CHECK(isc_socket_bind(xfr->socket, &xfr->sourceaddr));
+#endif
CHECK(isc_socket_connect(xfr->socket, &xfr->masteraddr, xfr->task,
xfrin_connect_done, xfr));
xfr->connects++;