Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 88480 invoked by uid 500); 22 Nov 2002 11:16:42 -0000 Mailing-List: contact dev-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 dev@httpd.apache.org Received: (qmail 88459 invoked from network); 22 Nov 2002 11:16:42 -0000 Date: Fri, 22 Nov 2002 20:16:48 +0900 (JST) Message-Id: <20021122.201648.85385054.hanai@imgsrc.co.jp> To: trawick@apache.org Cc: dev@httpd.apache.org Subject: Re: cvs commit: httpd-2.0/server listen.c From: hiroyuki hanai In-Reply-To: <20021114141711.27704.qmail@icarus.apache.org> References: <20021114141711.27704.qmail@icarus.apache.org> X-Mailer: Mew version 3.1rc1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS on ns.imgsrc.co.jp X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On 14 Nov 2002 14:17:11 -0000, trawick@apache.org wrote: > trawick 2002/11/14 06:17:11 > > Modified: . CHANGES acinclude.m4 configure.in > docs/conf httpd-std.conf.in ssl-std.conf > server listen.c > Log: > Add --[enable|disable]-v4-mapped configure option to control > whether or not Apache expects to handle IPv4 connections > on IPv6 listening sockets. Either setting will work on > systems with the IPV6_V6ONLY socket option. --enable-v4-mapped > must be used on systems that always allow IPv4 connections on > IPv6 listening sockets. after this commit, httpd cannot run with following error; [Fri Nov 22 20:01:43 2002] [crit] (22)Invalid argument: make_sock: for address 127.0.0.1:80, apr_socket_opt_set: (IPV6_V6ONLY) no listening sockets available, shutting down Unable to open logs on my FreeBSD boxes, both -current and -stable with ipv4-mapping disabled and enabled respectively. i think this error occurs because IPV6_V6ONLY option are being set on all sockets; even if on the IPv4 sockets. following is a patch to set IPV6_V6ONLY option on only IPv6 sockets. i don't know if this is a correct answer but it solves at least my problem... Regards, hiro hanai ----------------------------------------------------------------------------- Index: listen.c =================================================================== RCS file: /fs/pub/cvs/Apache/httpd-2.0/server/listen.c,v retrieving revision 1.83 diff -u -r1.83 listen.c --- listen.c 14 Nov 2002 14:17:11 -0000 1.83 +++ listen.c 22 Nov 2002 09:52:45 -0000 @@ -118,14 +118,16 @@ } #if APR_HAVE_IPV6 - stat = apr_socket_opt_set(s, APR_IPV6_V6ONLY, v6only_setting); - if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) { + if (server->bind_addr->family == AF_INET6) { + stat = apr_socket_opt_set(s, APR_IPV6_V6ONLY, v6only_setting); + if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) { ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p, "make_sock: for address %pI, apr_socket_opt_set: " "(IPV6_V6ONLY)", server->bind_addr); apr_socket_close(s); return stat; + } } #endif -----------------------------------------------------------------------------