From owner-freebsd-apache@FreeBSD.ORG Mon Aug 13 14:33:01 2012 Return-Path: Delivered-To: apache@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83897106564A for ; Mon, 13 Aug 2012 14:33:01 +0000 (UTC) (envelope-from pgollucci@p6m7g8.com) Received: from mail-qa0-f54.google.com (mail-qa0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 37C958FC0A for ; Mon, 13 Aug 2012 14:33:00 +0000 (UTC) Received: by qatn12 with SMTP id n12so1031621qat.13 for ; Mon, 13 Aug 2012 07:33:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=o/T+3n9EuANQiCsvCwuoswDJhZs9bcmLrcHEDAQ2VWI=; b=WDmDZm2cYJ2EReLEjHpaNNTFaNvS3U2eqN6SKrraLbwARSKK2x1ba/n0hGFMOjI7DL EYB1BQ54XnxI3Tcrrx5cOzAE/pxh15oSmOLSwhb4iKOCetWSaiOvqg8nkNbDuC0Lc7Uw Bh1sV/bv+3SSYP6nMuBnAsmsjKRGlfmJzl7pnZTkHPdCSgNCf9Zh75Hef60CVqB2TSXF VkVOxoAfDra1mbeq53hJmawTWS92qT8ml5+SghMR6XpWK6wU8lVNEB7tKE8Cq8CzUISK cU5RJza2WtbSN19YRnPZRNTRt0stgTodYswV3oCnqaQnY8OwyQT0f6IqdTUHqiiPz8+C BLoA== MIME-Version: 1.0 Received: by 10.224.177.5 with SMTP id bg5mr25487646qab.40.1344868380288; Mon, 13 Aug 2012 07:33:00 -0700 (PDT) Received: by 10.49.85.41 with HTTP; Mon, 13 Aug 2012 07:33:00 -0700 (PDT) X-Originating-IP: [68.101.40.130] In-Reply-To: <201208122353.q7CNrOji075223@gateway.ipv6.occnc.com> References: <50282D58.5070605@FreeBSD.org> <201208122353.q7CNrOji075223@gateway.ipv6.occnc.com> Date: Mon, 13 Aug 2012 14:33:00 +0000 Message-ID: From: "Philip M. Gollucci" To: curtis@occnc.com X-Gm-Message-State: ALoCoQn6LGq6cnApPy8rhzPQn9p5mGcT0z24GyS8GOFxmYrF20A632HUZiXyhU7sKJ+hwZURI0iO Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "apache@FreeBSD.org" Subject: Re: patch to apache for IPv6 only httpd X-BeenThere: freebsd-apache@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Support of apache-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Aug 2012 14:33:01 -0000 What happens if you try to bind to an ip address the machine doesn't have whether v4 or v6 with this patch ? On Sun, Aug 12, 2012 at 11:53 PM, Curtis Villamizar wrote: > > In message <50282D58.5070605@FreeBSD.org> > Olli Hauer writes: > > > On 2012-08-11 23:22, Curtis Villamizar wrote: > > > FYI- > > > > > > This very simple patch prevents an assert when httpd is run on a > > > server that has no IPv4 address. An example is a BSD jail running > > > with only an IPv6 address on the interface (no loopback so no > > > 127.0.0.1 address to bind to). > > > > > > Copy the patch below into the files directory as > > > /usr/ports/www/apache22/files/patch-server__config.c > > > > > > The port maintainer is on the Cc. No bug has been reported. > > > > > > BTW- I noticed this a long time ago. I don't remember if I reported > > > it or forgot to. Appologies if this is a duplicate. It is not in the > > > httpd-2.2.22.tar.bz2 tarball, in the distinfo dated 23 July 2012. > > > > > > Curtis > > > > > > > > > --- ./server/config.c.orig 2010-10-07 09:56:54.000000000 -0700 > > > +++ ./server/config.c 2011-09-26 21:20:35.000000000 -0700 > > > @@ -1979,6 +1979,9 @@ > > > /* NOT virtual host; don't match any real network interface */ > > > rv = apr_sockaddr_info_get(&s->addrs->host_addr, > > > NULL, APR_INET, 0, 0, p); > > > + if (rv != APR_SUCCESS) > > > + rv = apr_sockaddr_info_get(&s->addrs->host_addr, > > > + NULL, APR_UNSPEC, 0, 0, p); > > > ap_assert(rv == APR_SUCCESS); /* otherwise: bug or no storage */ > > > > > > s->addrs->host_port = 0; /* matches any port */ > > > > Hi Curtis, > > > > Is this patch also relevant if apache22 was build with > > -DWITH_IPV6_V6ONLY ? > > > > -- > > olli > > > No. Apache was not built with -DWITH_IPV6_V6ONLY. It is apache built > with dual stack support though I don't think the code is any different > if built with WITH_IPV6_V6ONLY. Nothing here is conditionally > compiled. I also checked the .h where APR_INET is defined (in > srclib/apr/include/apr_network_io.h). It is unconditionally defined > to AF_INET. > > The code compiles but the server fails to run, giving an assert when > starting up. Its a simple patch. APR_INET6 could be used instead of > APR_UNSPEC in the patch. > > Curtis > _______________________________________________ > freebsd-apache@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-apache > To unsubscribe, send any mail to "freebsd-apache-unsubscribe@freebsd.org" > -- --------------------------------------------------------------------------------------------- 1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70 3F8C 75B8 8FFB DB9B 8C1C Philip M. Gollucci (pgollucci@p6m7g8.com) c: 703.336.9354 Member, Apache Software Foundation Committer, FreeBSD Foundation Consultant, P6M7G8 Inc. Director Operations, Ridecharge Inc. Work like you don't need the money, love like you'll never get hurt, and dance like nobody's watching.