Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 29625 invoked from network); 30 Jan 2006 13:59:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 Jan 2006 13:59:34 -0000 Received: (qmail 50299 invoked by uid 500); 30 Jan 2006 13:59:32 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 49278 invoked by uid 500); 30 Jan 2006 13:59:29 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 49267 invoked by uid 99); 30 Jan 2006 13:59:28 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jan 2006 05:59:28 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [209.133.192.6] (HELO devsys.jaguNET.com) (209.133.192.6) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jan 2006 05:59:27 -0800 Received: (from jim@localhost) by devsys.jaguNET.com (8.11.7a/jag-2.6) id k0UDx7402956 for dev@tomcat.apache.org; Mon, 30 Jan 2006 08:59:07 -0500 (EST) From: Jim Jagielski Message-Id: <200601301359.k0UDx7402956@devsys.jaguNET.com> Subject: Re: AprEndpoint and IPv6 To: dev@tomcat.apache.org Date: Mon, 30 Jan 2006 08:59:03 -0500 (EST) Reply-To: jim@jaguNET.com In-Reply-To: <200601301247.54889.mailing-tomcat-dev@schoenhaber.de> from "Markus =?iso-8859-1?q?Sch=F6nhaber?=" at Jan 30, 2006 12:47:54 PM X-Mailer: ELM [version 2.5 PL5] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Markus =?iso-8859-1?q?Sch=F6nhaber?= wrote: > > Jean-frederic Clere wrote: > > Jean-frederic Clere wrote: > > > Jim Jagielski wrote: > > >> There's a bug report (37788) regarding allowing AprEndpoint > > >> to use APR IPv6 addresses. Their patch is almost right, but > > >> instead the value should be to use APR_UNSPEC instead > > >> of APR_INET6 (or the current APR_INET) to allow APR > > >> to correctly determine IP version and do a graceful > > >> recovery... As well as handle cases where APR wasn't > > >> built with IPv6 support. > > >> > > >> I'd like to commit that change... comments? > > > > > > -1: It also cores on my machine. > > > +++ > > > # > > > # An unexpected error has been detected by HotSpot Virtual Machine: > > > # > > > # SIGSEGV (0xb) at pc=0xa808eb5e, pid=10005, tid=3084708160 > > > # > > > # Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed mode) > > > # Problematic frame: > > > # C [libapr-1.so.0+0x19b5e] apr_socket_bind+0x2e > > > # > > > +++ > > > > > > APR_INET6 works OK with the same configuration. > > > > With the following patch: > > +++ > > Index: src/network.c > > =================================================================== > > --- src/network.c (revision 373299) > > +++ src/network.c (working copy) > > @@ -280,7 +280,7 @@ > > GET_S_FAMILY(f, family); > > GET_S_TYPE(t, type); > > > > - if (family > 0) { > > + if (family >= 0) { > > TCN_THROW_IF_ERR(apr_socket_create(&s, > > f, t, protocol, p), a); > > } > > @@ -290,7 +290,7 @@ > > a = (tcn_socket_t *)apr_pcalloc(p, sizeof(tcn_socket_t)); > > a->sock = s; > > a->pool = p; > > - if (family > 0) > > + if (family >= 0) > > a->net = &apr_socket_layer; > > a->opaque = s; > > apr_pool_cleanup_register(p, (const void *)a, > > +++ > > It works. > > > > Comments? > > With the above patch it works for me too. > Ahhh. Good catch on searching for a family check. Now do see why it didn't dump core for me :) -- =========================================================================== Jim Jagielski [|] jim@jaguNET.com [|] http://www.jaguNET.com/ "If you can dodge a wrench, you can dodge a ball." --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org