httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk-Willem van Gulik <di...@webweaving.org>
Subject Re: local/remote address in conn_rec
Date Sun, 24 Oct 1999 12:09:52 GMT

Actually, all of this might need a change, if we pull in KAME's IPv6
patches. If we have to touch a lot of code, we might as well take this
abstraction into account as well.

Dw

On Wed, 20 Oct 1999, Brian Havard wrote:

> Hi all,
>   After gettings 2.0 to build and run on OS/2 I noticed that the access log
> is showing rubbish for the client address. I traced the problem back to the
> fact that the client & server address records (sa_client, sa_server) passed
> to ap_new_connection() are never set.
> 
>   The question is, should we still be using sockaddr_in structures with APR?
> I would think no, which would mean the conn_rec's
> 
>     struct sockaddr_in local_addr;	/* local address */
>     struct sockaddr_in remote_addr;	/* remote address */
> 
> will need to change, but to what? Perhaps two ap_socket_t *'s ? That would
> allow things like ap_getipaddr() & ap_get_remote_hostname() to be used on
> them.
> 
> 
> One other thing I noticed. When using ap_accept() in the main loop the new
> sockets created are allocated from the global pool (same pool as the listen
> socket was allocated from) which means it will never be freed, leaking one
> ap_socket_t for every connection. The only way I can see around this is to
> give ap_accept a context to allocate new sockets from instead of using the
> listener's context.
> 
> 


Mime
View raw message