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 0.0.0.0 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 0.0.0.0 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 still 0.0.0.0. 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?
