Return-Path: Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 34417 invoked by uid 500); 13 Aug 2003 21:14:48 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 34366 invoked by uid 500); 13 Aug 2003 21:14:48 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Received: (qmail 34330 invoked from network); 13 Aug 2003 21:14:47 -0000 Received: from prv-mail20.provo.novell.com (137.65.81.122) by daedalus.apache.org with SMTP; 13 Aug 2003 21:14:47 -0000 Received: from INET-PRV-MTA by prv-mail20.provo.novell.com with Novell_GroupWise; Wed, 13 Aug 2003 15:14:53 -0600 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.5.1 Date: Wed, 13 Aug 2003 15:14:40 -0600 From: "Brad Nicholes" To: ,, Subject: Re: cvs commit: httpd-2.0/server listen.c Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Spam-Rating: daedalus.apache.org 1.6.2 500/1000/N This change causes a problem on NetWare. In the function alloc_listener() = before the change, the code did not allow the variable addr to be NULL. = In the changed code addr is allowed to be NULL which means that the call = to strcmp() after the call to apr_sockaddr_port_get() causes NetWare to = fault. Brad Brad Nicholes Senior Software Engineer Novell, Inc., the leading provider of Net business solutions http://www.novell.com=20 >>> jerenkrantz@apache.org Wednesday, August 13, 2003 1:17:45 PM >>> jerenkrantz 2003/08/13 12:17:45 Modified: . CHANGES server listen.c Log: Correct failure with Listen directives on machines with IPv6 enabled by removing find_default_family() and letting APR determine what should be = done without a hostname. =20 This patch requires the corollary APR patch to properly call getaddrinfo(= ). =20 (Justin modified Colm's patch to always walk the old listeners even when we have an address. That part of the patch wasn't really relevant.) =20 Submitted by: Colm MacC=E1rthaigh Reviewed by: Justin Erenkrantz =20 Revision Changes Path 1.1251 +3 -0 httpd-2.0/CHANGES =20 Index: CHANGES =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/cvs/httpd-2.0/CHANGES,v retrieving revision 1.1250 retrieving revision 1.1251 diff -u -u -r1.1250 -r1.1251 --- CHANGES 12 Aug 2003 21:02:00 -0000 1.1250 +++ CHANGES 13 Aug 2003 19:17:45 -0000 1.1251 @@ -2,6 +2,9 @@ =20 [Remove entries to the current 2.0 section below, when backported] =20 + *) Correct failure with Listen directives on machines with IPv6 = enabled. + [Colm MacC=E1rthaigh , Justin Erenkrantz] + =20 *) Fix a link failure in mod_ssl when the OpenSSL libraries contain the ENGINE functions but the engine header files are missing. [Cliff Woolley] =20 =20 =20 1.87 +0 -50 httpd-2.0/server/listen.c =20 Index: listen.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/cvs/httpd-2.0/server/listen.c,v retrieving revision 1.86 retrieving revision 1.87 diff -u -u -r1.86 -r1.87 --- listen.c 31 Mar 2003 04:30:38 -0000 1.86 +++ listen.c 13 Aug 2003 19:17:45 -0000 1.87 @@ -235,38 +235,6 @@ } =20 =20 -static void find_default_family(apr_pool_t *p) -{ -#if APR_HAVE_IPV6 - /* We know the platform supports IPv6, but this particular - * system may not have IPv6 enabled. See if we can get an - * AF_INET6 socket and bind to an ephemeral port. (On most - * systems, getting an AF_INET6 socket is a sufficient test. - * On certain levels of OpenUNIX, getting the socket is - * successful but bind always returns ENETUNREACH.) - */ - if (default_family =3D=3D APR_UNSPEC) { - apr_status_t sock_rv; - apr_socket_t *tmp_sock; - apr_sockaddr_t *sa; - - if ((sock_rv =3D apr_socket_create(&tmp_sock, APR_INET6, = SOCK_STREAM, p))=20 - =3D=3D APR_SUCCESS && - apr_sockaddr_info_get(&sa, NULL, APR_INET6, 0, 0, p) =3D=3D = APR_SUCCESS && - apr_bind(tmp_sock, sa) =3D=3D APR_SUCCESS) {=20 - default_family =3D APR_INET6; - } - else { - default_family =3D APR_INET; - } - if (sock_rv =3D=3D APR_SUCCESS) { - apr_socket_close(tmp_sock); - } - } -#endif -} - - static const char *alloc_listener(process_rec *process, char *addr, = apr_port_t port) { ap_listen_rec **walk; @@ -274,24 +242,6 @@ apr_status_t status; apr_port_t oldport; apr_sockaddr_t *sa; - - if (!addr) { /* don't bind to specific interface */ - find_default_family(process->pool); - switch(default_family) { - case APR_INET: - addr =3D "0.0.0.0"; - break; - -#if APR_HAVE_IPV6 - case APR_INET6: - addr =3D "::"; - break; -#endif - - default: - ap_assert(1 !=3D 1); /* should not occur */ - } - } =20 /* see if we've got an old listener for this address:port */ for (walk =3D &old_listeners; *walk; walk =3D &(*walk)->next) { =20 =20 =20