NetBSD Problem Report #17672
Received: (qmail 22753 invoked by uid 605); 21 Jul 2002 22:15:21 -0000
Message-Id: <200207212211.g6LMBJX08052@dixie.nag.notwork.org>
Date: Mon, 22 Jul 2002 07:11:19 +0900 (JST)
From: nagae@notwork.org
Sender: gnats-bugs-owner@netbsd.org
Reply-To: nagae@notwork.org
To: gnats-bugs@gnats.netbsd.org
Subject: wwwoffle-2.7b expects IPv4-mapped IPv6 address support
X-Send-Pr-Version: 3.95
>Number: 17672
>Category: pkg
>Synopsis: wwwoffle-2.7b does not bind IPv4 0.0.0.0
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jul 21 22:16:01 +0000 2002
>Closed-Date: Tue Aug 06 01:25:35 +0000 2002
>Last-Modified: Tue Aug 06 05:11:01 +0000 2002
>Originator: Nagae Hidetake
>Release: NetBSD 1.6D
>Organization:
>Environment:
System: NetBSD dixie.nag.notwork.org 1.6D NetBSD 1.6D (X20) #7: Sat Jul 13 08:18:01 JST 2002 nagae@johnny.nag.notwork.org:/usr/src/sys/arch/i386/compile/X20 i386
Architecture: i386
Machine: i386
>Description:
wwwoffle-2.7b does not bind 0.0.0.0 if bind-ipv6 is 0:0:0:0:0:0:0:0,
expecting it accepts IPv4 connections with IPv4-mapped IPv6 address.
Now NetBSD does not allow IPv4-mapped IPv6 address connections,
so IPv4 clients can't connect to wwwoffled.
>How-To-Repeat:
Set bind-ipv4 = 0.0.0.0 and bind-ipv6 = :: in wwwoffle.conf.
>Fix:
Disable this unification in wwwoffled.c, line 264.
>Release-Note:
>Audit-Trail:
From: fredb@immanent.net (Frederick Bruckman)
To: nagae@notwork.org
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: pkg/17672: wwwoffle-2.7b expects IPv4-mapped IPv6 address support
Date: Mon, 22 Jul 2002 00:18:30 -0500 (CDT)
In article <200207212211.g6LMBJX08052@dixie.nag.notwork.org>,
nagae@notwork.org writes:
>>Description:
> wwwoffle-2.7b does not bind 0.0.0.0 if bind-ipv6 is 0:0:0:0:0:0:0:0,
> expecting it accepts IPv4 connections with IPv4-mapped IPv6 address.
> Now NetBSD does not allow IPv4-mapped IPv6 address connections,
> so IPv4 clients can't connect to wwwoffled.
>>How-To-Repeat:
> Set bind-ipv4 = 0.0.0.0 and bind-ipv6 = :: in wwwoffle.conf.
As a work-around, you can set the "net.inet6.ip6.bindv6only" sysctl
to "0". I don't know why that's not the default in NetBSD -- I don't
see a downside.
--
Frederick
State-Changed-From-To: open->analyzed
State-Changed-By: agc
State-Changed-When: Mon Jul 22 02:03:33 PDT 2002
State-Changed-Why:
fredb analyzed the problem - see tracking text.
What I'd like to know is if this problem relates to the wwwoffle package,
or if it's more of a problem germane to NetBSD itself?
From: "Johnny C. Lam" <jlam@netbsd.org>
To: Frederick Bruckman <fredb@immanent.net>
Cc: nagae@notwork.org, gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org,
agc@netbsd.org
Subject: Re: pkg/17672: wwwoffle-2.7b expects IPv4-mapped IPv6 address support
Date: Mon, 5 Aug 2002 14:32:30 -0700
On Mon, Jul 22, 2002 at 12:18:30AM -0500, Frederick Bruckman wrote:
> In article <200207212211.g6LMBJX08052@dixie.nag.notwork.org>,
> nagae@notwork.org writes:
> >>Description:
> > wwwoffle-2.7b does not bind 0.0.0.0 if bind-ipv6 is 0:0:0:0:0:0:0:0,
> > expecting it accepts IPv4 connections with IPv4-mapped IPv6 address.
> > Now NetBSD does not allow IPv4-mapped IPv6 address connections,
> > so IPv4 clients can't connect to wwwoffled.
> >>How-To-Repeat:
> > Set bind-ipv4 = 0.0.0.0 and bind-ipv6 = :: in wwwoffle.conf.
>
> As a work-around, you can set the "net.inet6.ip6.bindv6only" sysctl
> to "0". I don't know why that's not the default in NetBSD -- I don't
> see a downside.
Apache has the same problem as described in this PR. If you have INET6
in your kernel, then Apache will only bind to the IPv6 addresses and not
the IPv4 ones. The workaround with Apache is you can explicitly specify
binding to 0.0.0.0:80 in the config file, but it'd be nice to not need
this.
Cheers,
-- Johnny Lam <jlam@netbsd.org>
From: Nagae Hidetake <nagae@notwork.org>
To: jlam@netbsd.org
Cc: fredb@immanent.net, gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org,
agc@netbsd.org
Subject: Re: pkg/17672: wwwoffle-2.7b expects IPv4-mapped IPv6 address
support
Date: Tue, 06 Aug 2002 06:59:11 +0900 (JST)
From: "Johnny C. Lam" <jlam@netbsd.org>
Subject: Re: pkg/17672: wwwoffle-2.7b expects IPv4-mapped IPv6 address support
Date: Mon, 5 Aug 2002 14:32:30 -0700
> On Mon, Jul 22, 2002 at 12:18:30AM -0500, Frederick Bruckman wrote:
> > In article <200207212211.g6LMBJX08052@dixie.nag.notwork.org>,
> > nagae@notwork.org writes:
> > >>Description:
> > > wwwoffle-2.7b does not bind 0.0.0.0 if bind-ipv6 is 0:0:0:0:0:0:0:0,
> > > expecting it accepts IPv4 connections with IPv4-mapped IPv6 address.
> > > Now NetBSD does not allow IPv4-mapped IPv6 address connections,
> > > so IPv4 clients can't connect to wwwoffled.
> > >>How-To-Repeat:
> > > Set bind-ipv4 = 0.0.0.0 and bind-ipv6 = :: in wwwoffle.conf.
> >
> > As a work-around, you can set the "net.inet6.ip6.bindv6only" sysctl
> > to "0". I don't know why that's not the default in NetBSD -- I don't
> > see a downside.
>
> Apache has the same problem as described in this PR. If you have INET6
> in your kernel, then Apache will only bind to the IPv6 addresses and not
> the IPv4 ones. The workaround with Apache is you can explicitly specify
> binding to 0.0.0.0:80 in the config file, but it'd be nice to not need
> this.
I heard IPv4-mapped IPv6 address is disabled intentionally in NetBSD.
I don't understand this issue as well as I can explain the reason.
Please refer the discussion titled "RFC1933 IPv4 mapped address" in
the archive of tech-net, December 1999.
http://mail-index.netbsd.org/tech-net/1999/12/
Following paper is also focused on this issue.
http://www.iijlab.net/i-d/draft-itojun-ipv6-transition-abuse-01.txt
BTW, wwwoffle does not bind 0.0.0.0 even if both :: and 0.0.0.0 are
specified in wwwoffle.conf. It compares specified addresses with
0:0:0:0:0:0:0:0 and 0.0.0.0, and binds only IPv6 one in this case
(see src/wwwoffled.c).
There is no work-around with config file.
The only way is sysctl (as Frederick wrote).
--
Nagae Hidetake nagae@notwork.org
From: Jun-ichiro itojun Hagino <itojun@iijlab.net>
To: Nagae Hidetake <nagae@notwork.org>
Cc: jlam@netbsd.org, fredb@immanent.net, gnats-bugs@gnats.netbsd.org,
netbsd-bugs@netbsd.org, agc@netbsd.org
Subject: Re: pkg/17672: wwwoffle-2.7b expects IPv4-mapped IPv6 address support
Date: Tue, 06 Aug 2002 09:13:20 +0900
>I heard IPv4-mapped IPv6 address is disabled intentionally in NetBSD.
>I don't understand this issue as well as I can explain the reason.
>Please refer the discussion titled "RFC1933 IPv4 mapped address" in
>the archive of tech-net, December 1999.
> http://mail-index.netbsd.org/tech-net/1999/12/
>Following paper is also focused on this issue.
> http://www.iijlab.net/i-d/draft-itojun-ipv6-transition-abuse-01.txt
and inet6(4). there's real threat in using IPv4 mapped address
with services like wwwoffled.
>BTW, wwwoffle does not bind 0.0.0.0 even if both :: and 0.0.0.0 are
>specified in wwwoffle.conf. It compares specified addresses with
>0:0:0:0:0:0:0:0 and 0.0.0.0, and binds only IPv6 one in this case
>(see src/wwwoffled.c).
>There is no work-around with config file.
>The only way is sysctl (as Frederick wrote).
i'll talk to wwwoffled developer. the above behavior is simply wrong.
itojun
State-Changed-From-To: analyzed->closed
State-Changed-By: wiz
State-Changed-When: Mon Aug 5 18:25:02 PDT 2002
State-Changed-Why:
A fix for this has been committed, just add :: and 0.0.0.0 in wwwoffle.conf
Thanks for the PR!
From: Frederick Bruckman <fredb@immanent.net>
To: Jun-ichiro itojun Hagino <itojun@iijlab.net>
Cc: Nagae Hidetake <nagae@notwork.org>, "Johnny C. Lam" <jlam@netbsd.org>,
<gnats-bugs@gnats.netbsd.org>, "Alistair G. Crooks" <agc@netbsd.org>
Subject: Re: pkg/17672: wwwoffle-2.7b expects IPv4-mapped IPv6 address support
Date: Mon, 5 Aug 2002 21:35:56 -0500 (CDT)
On Tue, 6 Aug 2002, Jun-ichiro itojun Hagino wrote:
> >BTW, wwwoffle does not bind 0.0.0.0 even if both :: and 0.0.0.0 are
> >specified in wwwoffle.conf. It compares specified addresses with
> >0:0:0:0:0:0:0:0 and 0.0.0.0, and binds only IPv6 one in this case
> >(see src/wwwoffled.c).
> >There is no work-around with config file.
> >The only way is sysctl (as Frederick wrote).
>
> i'll talk to wwwoffled developer. the above behavior is simply wrong.
The following patch contains a patch that's been sent to Andrew M.
Bishop for consideration. To simplify future maintainence, I'm going
to hold off on committing until I hear back from him.
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/wwwoffle/Makefile,v
retrieving revision 1.38
diff -u -r1.38 Makefile
--- Makefile 2002/07/25 15:56:19 1.38
+++ Makefile 2002/08/06 01:16:26
@@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.38 2002/07/25 15:56:19 fredb Exp $
DISTNAME= wwwoffle-2.7c
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= www
MASTER_SITES= ftp://ftp.demon.co.uk/pub/unix/httpd/ \
http://www.gedanken.freeserve.co.uk/download-wwwoffle/ \
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/www/wwwoffle/distinfo,v
retrieving revision 1.13
diff -u -r1.13 distinfo
--- distinfo 2002/07/25 15:56:20 1.13
+++ distinfo 2002/08/06 01:16:26
@@ -4,3 +4,4 @@
Size (wwwoffle-2.7c.tgz) = 867164 bytes
SHA1 (patch-aa) = 897de385a47826e16a8a09b1bc1c207a2d350f94
SHA1 (patch-ab) = 0dfd322da2bb9750668319132fc9d0a0a4c035dd
+SHA1 (patch-ac) = 12c9a6e5ea4d56e02f558b7ea5a997b567cdfe34
Index: patches/patch-ac
===================================================================
RCS file: patch-ac
diff -N patch-ac
--- /dev/null Mon Aug 5 20:15:41 2002
+++ patch-ac Mon Aug 5 20:16:26 2002
@@ -0,0 +1,40 @@
+$NetBSD$
+
+--- src/wwwoffled.c.orig Sun Jun 23 06:02:35 2002
++++ src/wwwoffled.c
+@@ -291,7 +291,7 @@
+ }
+ #endif
+
+-#if USE_IPV6
++#if 0
+ if(http_fd[1]!=-1 && ConfigString(Bind_IPv4) && ConfigString(Bind_IPv6) &&
+ !strcmp(ConfigString(Bind_IPv6),"0:0:0:0:0:0:0:0") && !strcmp(ConfigString(Bind_IPv4),"0.0.0.0"))
+ PrintMessage(Inform,"Not creating HTTP IPv4 server socket on all addresses since IPv6 one is bound to all addresses.");
+@@ -310,7 +310,7 @@
+ #endif
+ }
+ }
+-#if USE_IPV6
++#if 0
+ }
+ #endif
+
+@@ -335,7 +335,7 @@
+ }
+ #endif
+
+-#if USE_IPV6
++#if 0
+ if(wwwoffle_fd[1]!=-1 && ConfigString(Bind_IPv4) && ConfigString(Bind_IPv6) &&
+ !strcmp(ConfigString(Bind_IPv6),"0:0:0:0:0:0:0:0") && !strcmp(ConfigString(Bind_IPv4),"0.0.0.0"))
+ PrintMessage(Inform,"Not creating WWWOFFLE IPv4 server socket on all addresses since IPv6 one is bound to all addresses.");
+@@ -354,7 +354,7 @@
+ #endif
+ }
+ }
+-#if USE_IPV6
++#if 0
+ }
+ #endif
+
Frederick
From: itojun@iijlab.net
To: Frederick Bruckman <fredb@immanent.net>
Cc: Nagae Hidetake <nagae@notwork.org>, "Johnny C. Lam" <jlam@netbsd.org>,
gnats-bugs@gnats.netbsd.org, "Alistair G. Crooks" <agc@netbsd.org>
Subject: Re: pkg/17672: wwwoffle-2.7b expects IPv4-mapped IPv6 address support
Date: Tue, 06 Aug 2002 14:10:44 +0900
>> >BTW, wwwoffle does not bind 0.0.0.0 even if both :: and 0.0.0.0 are
>> >specified in wwwoffle.conf. It compares specified addresses with
>> >0:0:0:0:0:0:0:0 and 0.0.0.0, and binds only IPv6 one in this case
>> >(see src/wwwoffled.c).
>> >There is no work-around with config file.
>> >The only way is sysctl (as Frederick wrote).
>> i'll talk to wwwoffled developer. the above behavior is simply wrong.
>The following patch contains a patch that's been sent to Andrew M.
>Bishop for consideration. To simplify future maintainence, I'm going
>to hold off on committing until I hear back from him.
actually, i already have committed it:-)
itojun
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.