Re: PR 7492
"Don Hughes" <[EMAIL PROTECTED]> writes: > I converted a working Apache1.3 server to Apache2.0 on a SuSE Linux system > with IPV6 support. > > All httpd.conf address references are in IPV4 format, all log/status/error messages > show all addresses in IPV4 format. However, I had to use IPV6 address in the > VHosts sections or the incoming requests would not match. > > I just committed a fix for this. Thanks for your report! -- Jeff Trawick | [EMAIL PROTECTED] | PGP public key at web site: http://www.geocities.com/SiliconValley/Park/9289/ Born in Roswell... married an alien...
Re: PR 7492
"Don Hughes" <[EMAIL PROTECTED]> writes: > I converted a working Apache1.3 server to Apache2.0 on a SuSE Linux system > with IPV6 support. > > All httpd.conf address references are in IPV4 format, all log/status/error messages > show all addresses in IPV4 format. However, I had to use IPV6 address in the > VHosts sections or the incoming requests would not match. > > Can you try this patch? Index: server/vhost.c === RCS file: /cvs/apache/httpd-2.0/server/vhost.c,v retrieving revision 1.63 diff -u -r1.63 vhost.c --- vhost.c 2001/11/20 18:27:07 1.63 +++ vhost.c 2001/12/25 22:32:32 @@ -414,6 +414,15 @@ sa->ipaddr_len)) { return trav; } +#if APR_HAVE_IPV6 +else if (IN6_IS_ADDR_V4MAPPED((struct in6_addr *)sa->ipaddr_ptr) && +cur->sa.sin.sin_family == AF_INET && +!memcmp(&((struct in6_addr *)sa->ipaddr_ptr)->s6_addr[12], +cur->ipaddr_ptr, +4)) { +return trav; +} +#endif } } return NULL; I definitely need to revisit IPv6 vhost stuff and develop some good testcases so I can track what works and what doesn't. -- Jeff Trawick | [EMAIL PROTECTED] | PGP public key at web site: http://www.geocities.com/SiliconValley/Park/9289/ Born in Roswell... married an alien...
Re: PR 7492
"Don Hughes" <[EMAIL PROTECTED]> writes: > I converted a working Apache1.3 server to Apache2.0 on a SuSE Linux system > with IPV6 support. > > All httpd.conf address references are in IPV4 format, all log/status/error messages > show all addresses in IPV4 format. However, I had to use IPV6 address in the > VHosts sections or the incoming requests would not match. > > > > This certainly was not intuitive, and took several days of fussing to discover. That isn't the expected behavior either. I'll play with it and see what I can come up with. Are you running fairly current CVS, or 2.0.28, or something else? -- Jeff Trawick | [EMAIL PROTECTED] | PGP public key at web site: http://www.geocities.com/SiliconValley/Park/9289/ Born in Roswell... married an alien...
Re: PR 7492
I converted a working Apache1.3 server to Apache2.0 on a SuSE Linux system with IPV6 support. All httpd.conf address references are in IPV4 format, all log/status/error messages show all addresses in IPV4 format. However, I had to use IPV6 address in the VHosts sections or the incoming requests would not match. This certainly was not intuitive, and took several days of fussing to discover. ...don [EMAIL PROTECTED]
Re: PR 7492 (IPv6 and Listen *)
"William A. Rowe, Jr." <[EMAIL PROTECTED]> 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 | [EMAIL PROTECTED] | 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 *)
"Joshua Slive" <[EMAIL PROTECTED]> writes: > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]]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 | [EMAIL PROTECTED] | 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 *)
From: "Joshua Slive" <[EMAIL PROTECTED]> Sent: Monday, December 03, 2001 9:12 AM > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]]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 *)
> From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]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 *)
Curt Sampson <[EMAIL PROTECTED]> 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 | [EMAIL PROTECTED] | PGP public key at web site: http://www.geocities.com/SiliconValley/Park/9289/ Born in Roswell... married an alien...
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 <[EMAIL PROTECTED]> +81 3 5778 0123 http://www.netbsd.org Don't you know, in this new Dark Age, we're all light. --XTC