apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colm MacCarthaigh <c...@stdlib.net>
Subject Re: svn commit: r602176 - /apr/apr/trunk/network_io/unix/sockaddr.c
Date Mon, 10 Dec 2007 19:55:47 GMT
On Mon, Dec 10, 2007 at 12:57:18PM -0600, William A. Rowe, Jr. wrote:
> Now apr has provided a tuple of ip address, family and port that
> cannot be reconstituted by APR.  So, for example, where we have
> to create a connection to the very same host/family on a different
> port, it becomes impossible.

O.k., so the scenario is ;

	1. Host application listens on :: , accepts incoming socket
	   from ::ffff:127.0.0.1

	2. Host application resolves the IP into a text format.
	   (calls getnameinfo or whatever)

	3. Host application takes that text format and turns 
	   it back into a sockaddr. (calls getaddrinfo or whatever)

	4. Connects to that IP.

Why would it ever do steps 2 and 3?

Maybe we should support using INET6 sockets for outbound IPv4
connections more - and the patch would enable that for connections
involving lookups - but the use-case scanario is mighty strange, it has
to go through a text lookup.

> They know the family and IP from an existing connection, and that
> existing connection is internally inconsistent.

How? we don't modify the sockaddr.

-- 
Colm MacCárthaigh                        Public Key: colm+pgp@stdlib.net

Mime
View raw message