ORBNamingIOR=corbaloc:iiop:1 0 localhost:12000 fails to connect to nameserver
- From: Dmitry Maksyoma <dmaks esphion com>
- To: orbit-list gnome org
- Subject: ORBNamingIOR=corbaloc:iiop:1 0 localhost:12000 fails to connect to nameserver
- Date: Fri, 6 Jul 2007 15:53:08 +1200
Hello,
I'm using orbit 2.14.3. I run my CORBA server with
-ORBNamingIOR=corbaloc:iiop:1 0 localhost:12000/NameService option, but it
fails to connect to the CORBA name server. It connects if I change
localhost to domain name for this host.
I've tracked down the problem to link_connection_do_initiate() function.
There exists a check of whether supplied host name equals to FQDN of the
local host, or whether their IP addresses match. I don't understand the
reason for this check; why connections to other hosts are forbidden (and,
more importantly, to localhost)?
Here's the code:
static gboolean
link_connection_do_initiate (LinkConnection *cnx,
const char *proto_name,
const char *host,
const char *service,
LinkConnectionOptions options)
{
const LinkProtocolInfo *proto;
int rv;
int fd;
gboolean retval = FALSE;
struct sockaddr *saddr;
LinkSockLen saddr_len;
proto = link_protocol_find (proto_name);
if (!proto)
return FALSE;
if (host && (strcmp (proto_name, "IPv4") == 0)) {
const char *local_host;
local_host = link_get_local_hostname ();
if (strcmp (host, local_host)) {
unsigned long inet_addr_host, inet_addr_local_host;
inet_addr_host = get_inet_addr (host);
inet_addr_local_host = get_inet_addr (local_host);
if (inet_addr_host != inet_addr_local_host)
return FALSE;
}
}
Thanks.
--
/Dmitry <dmaks esphion com>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]