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

Tor Lillqvist <[email protected]>
Newsgroups gmane.comp.gnome.orbit.general
Message-ID <[email protected]>
Jules Colding writes:
 > So the address returned by get_netid() must always be an IP address.
 > That would ensure that no lookup is done.

No it wouldn't. The problem occurs for me precisely with the default
setting of use_local_host = LINK_NET_ID_IS_IPADDR. The problem is that
other code in linc2 later calls gethostbyaddr() to look up a name for
that address net_getid() returned, and that name is then passed
around, until yet other code then calls gethostbyname() to look up the
address for the name, and that address is different that the one
get_netid() returned.

 > I agree. Would the right cure be to change get_netid() to
 > unconditionally return an IP address and simply remove the ORBNetID
 > option entirely? 

Sure, and also drop the calls to gethostbyaddr() in
link_protocol_get_sockinfo_ipv4/6() and instead have them simply store
the ASCII representation of the sockaddr in hostname. For backward
compatibility, linc2 should still *accept* also hostnames, but it
should *produce* only numerical IP addresses.

--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.