httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jus...@erenkrantz.com>
Subject Re: Listen 0.0.0.0:<port> is invalid
Date Wed, 23 Feb 2005 15:37:54 GMT
--On Wednesday, February 23, 2005 9:42 AM +0000 Joe Orton <jorton@redhat.com> 
wrote:

> But there is no way to differentiate between any different interfaces
> for the address (without doing magic), so I would say that is a resolver
> misfeature.

But, the resolver was explicitly told that the socket addresses will be used 
to connect() - not for bind().  That's why I'm not convinced this behavior is 
'wrong' per se.

> "Listen 0.0.0.0:<port>" should always work because there's no other way
> to configure httpd to bind only to "all IPv4 addresses on the local host
> with port X" (right?), which is certainly a valid and useful thing to
> do.
>
> I think httpd should work around this: does something like the attached
> work? (tested only to compile ;) Not necessarily the best place to put
> this logic.

It seems that we should have a better internal semantic than passing in a 
bogus address to connect to.  Perhaps httpd in alloc_listener should intercept 
the '0.0.0.0' case and set the hostname to NULL and set the family to IPv4? 
This would preserve the correct internal semantics we're looking for such that 
AI_PASSIVE can be set so we get bind()able addresses.

Would that be better?  -- justin

Mime
View raw message