You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Curt Sampson <cj...@cynic.net> on 2001/12/03 05:40:05 UTC

PR 7492 (IPv6 and Listen *)

Is anybody out there working on a resolution of PR 7492? The bug
is basically that, when you use "Listen *", it listens only on IPv6
interfaces, and never opens any of the IPv4 interfaces in the system.
(This may actually work to listen on IPv4 interfaces on some systems, but
not all systems implement section 3.7 of RFC2553, and for good reason.)

It seems a bit odd that this bug has been open for more than eight months
now, since the fix to me doesn't seem so terribly difficult. Are there
some other issues not mentioned in the PR that are impeding progress?

cjs
-- 
Curt Sampson  <cj...@cynic.net>   +81 3 5778 0123   http://www.netbsd.org
    Don't you know, in this new Dark Age, we're all light.  --XTC


Re: PR 7492 (IPv6 and Listen *)

Posted by Jeff Trawick <tr...@attglobal.net>.
"Joshua Slive" <jo...@slive.ca> writes:

> > From: trawick@rdu163-40-092.nc.rr.com
> > [mailto:trawick@rdu163-40-092.nc.rr.com]On Behalf Of Jeff Trawick
> >
> > 3) I don't like the idea that one Listen statement means more than one
> >    listening socket
> 
> I don't understand what you mean by that.  Listen * has always been a
> special case that listens to ALL available addresses on one port.  This has
> been the default behaviour of apache, and it is the behaviour that a naive
> user would expect.

I have great respect for what "Listen *" has always meant.  I have
great respect for the notion that an application needs to try hard to
simplify behaviors so that the documentation can be clear and concise.

Thinking from the implementation side, I can't help but note that this
"default behavior of apache" comes from the normal way that bind()
works, not from any trickery on the part of Apache.  "Listen *" has
always meant one socket.  

Where I'm coming from in saying "I don't like" is that it seems like
a code ugliness and code maintenance problem for one Listen statement
to map to more than one listening socket.  Note that this would only
need to happen on systems that current Apache developers (and IPv6
developer(s) in particular) don't use, so maintainability is a real
issue. 

This is not just a code issue but also a problem determination issue
(the use/interpretation of tools like netstat, lsof, /proc/pid/fd/*,
etc.).

As far as "naive user"...  If "make install" does as I suggested then
I don't see that the naive user is going to have a problem.  We can
even slap in a comment that says why we added the extra Listen
statement.

This isn't a closed issue for me, but I've been mulling it over for
months and this is all I have come up with so far.  Maybe that will
change.

(And in case Curt isn't familiar with how things work around here, he
should understand that just because the first person whose attention
he got might not agree completely with his desire, there are any
number of other people here qualified to take an alternate view and
implement such.)

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: PR 7492 (IPv6 and Listen *)

Posted by Jeff Trawick <tr...@attglobal.net>.
"William A. Rowe, Jr." <wr...@covalent.net> writes:

> Maybe [to keep Jeff happy] we further parse
> 
> Listen *:80
> Listen [*]:80
> 
> to bind to only IPv4 and IPv6 respectively (or something like that???)

We already have the ability to do

Listen 0.0.0.0:80
Listen [::]:80

so in effect we already have that.

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: PR 7492 (IPv6 and Listen *)

Posted by "William A. Rowe, Jr." <wr...@covalent.net>.
From: "Joshua Slive" <jo...@slive.ca>
Sent: Monday, December 03, 2001 9:12 AM


> > From: trawick@rdu163-40-092.nc.rr.com
> > [mailto:trawick@rdu163-40-092.nc.rr.com]On Behalf Of Jeff Trawick
> >
> > 3) I don't like the idea that one Listen statement means more than one
> >    listening socket
> 
> I don't understand what you mean by that.  Listen * has always been a
> special case that listens to ALL available addresses on one port.  This has
> been the default behaviour of apache, and it is the behaviour that a naive
> user would expect.

I think Jeff is saying that;

Listen n.n.n.n:80

shouldn't listen to more than one port.  If given in IPv4 notation, it should
only listen on that address.  Given in IPv6 notation, should only listen on
the IPv6 address.

But I'd agree that

Listen 80

is a special case.  

Maybe [to keep Jeff happy] we further parse

Listen *:80
Listen [*]:80

to bind to only IPv4 and IPv6 respectively (or something like that???)

Bill



RE: PR 7492 (IPv6 and Listen *)

Posted by Joshua Slive <jo...@slive.ca>.
> From: trawick@rdu163-40-092.nc.rr.com
> [mailto:trawick@rdu163-40-092.nc.rr.com]On Behalf Of Jeff Trawick
>
> 3) I don't like the idea that one Listen statement means more than one
>    listening socket

I don't understand what you mean by that.  Listen * has always been a
special case that listens to ALL available addresses on one port.  This has
been the default behaviour of apache, and it is the behaviour that a naive
user would expect.

Joshua.


Re: PR 7492 (IPv6 and Listen *)

Posted by Jeff Trawick <tr...@attglobal.net>.
Curt Sampson <cj...@cynic.net> writes:

> Is anybody out there working on a resolution of PR 7492? The bug
> is basically that, when you use "Listen *", it listens only on IPv6
> interfaces, and never opens any of the IPv4 interfaces in the system.
> (This may actually work to listen on IPv4 interfaces on some systems, but
> not all systems implement section 3.7 of RFC2553, and for good reason.)
> 
> It seems a bit odd that this bug has been open for more than eight months
> now, since the fix to me doesn't seem so terribly difficult. Are there
> some other issues not mentioned in the PR that are impeding progress?

This issue has certainly been in the back of my mind but:

1) there is an easy work-around (add another Listen statement)

2) this doesn't seem to be a problem on most systems

3) I don't like the idea that one Listen statement means more than one
   listening socket

My current feeling is that this should be a permanent restriction and
that we should document it as such so that people know what to expect.

Now beyond how the Apache internals work...  Perhaps APR should know
that this is such a system (that doesn't listen on IPv4) and Apache
install should see that and stick an extra Listen statement in the
config file at "make install" time.  We can't just put two flavors of
Listen in.  It will blow on most Apache installations.

Unfortunately, I don't have access to such a system, even though I do
use a number of systems with IPv6 support.
-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...