apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: [PATCH] we need to init _unknown?
Date Sat, 25 Nov 2006 21:07:34 GMT
William A. Rowe, Jr. wrote:
> So where does your test case code get off calling apr_socket_addr_get when
> the local_interface_unknown is initialized to zero (known?) and the address
> is still ephemeral?
> It so happened that the failure of apr_socket_addr_get to detect the
> 'unknown' state of the interface resulted in and it also so happens
> that on some platforms connect -will- bind to the ephemeral port.

Further info; even with a hack that ensures local_interface_unknown is set
to 1 on apr_socket_bind(), the ephemeral port is still not expanded.  Also,
any random call to apr_sockaddr_info_get with a null or ephemeral IP
still results in an ephemeral port.  Although I see where find_addresses (the
inet_addr() flavor) should iterate a list and pick the first - the first is

I'm not seeing where or how we should be extracting a possible absolute port
from the ld socket for the purposes of apr_connect().

Pointers please?

View raw message