Re: [PATCH] New ORB_init option "ORBNetID=<string>"

Tor Lillqvist <[email protected]>
Newsgroups gmane.comp.gnome.orbit.general
Message-ID <[email protected]>
I think this patch broke test-linc on multihomed hosts. I have tested
only on Win32, but assume the same can happen on Unix. The scenario,
as I see it, is as follows:

- get_netid() looks up the interfaces of the machine, and chooses the
address if the first non-loopback one it finds. 

- link_server_setup() creates a socket and binds it to this address.

- link_server_setup() calls link_protocol_get_sockinfo() which calls
link_protocol_get_sockinfo_ipv4(), which calls gethostbyaddr() on the
address get_netid() returned. This returns a name for the machine.

- create_client() then tries to connect to the server using the name
looked up by link_protocol_get_sockinfo_ipv4(). Eventually
link_protocol_get_sockaddr_ipv4() is called and it looks up this
name. This however returns *another* one of the machine's
addresses. Thus the connection fails.

I.e. the problem is that the IP address get_netid() returns is not
necessarily the one that looking up the address corresponding to the
machine's name will return.

The use of hostnames and/or IP addresses in linc2 seems quite mixed up
and confusing. Couldn't we just stop using hostnames completely in
ORBit2, and use only IP (v4 or v6) addresses in IORs etc?

--tml
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.