ORBNamingIOR=corbaloc:iiop:1.0@localhost:12000 fails to connect to nameserver

View: New views
2 Messages — Rating Filter:   Alert me  

ORBNamingIOR=corbaloc:iiop:1.0@localhost:12000 fails to connect to nameserver

by Dmitry Maksyoma :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...>
_______________________________________________
orbit-list mailing list
orbit-list@...
http://mail.gnome.org/mailman/listinfo/orbit-list

Re: ORBNamingIOR=corbaloc:iiop:1.0@localhost:12000 fails to connect to nameserver

by colding :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Dmitry,


On Fri, 2007-07-06 at 15:53 +1200, Dmitry Maksyoma wrote:
> Hello,
>
>   I'm using orbit 2.14.3. I run my CORBA server with

Please upgrade your ORBit2. 2.14.3 had a bug that prevented all
non-local connections from working. This might be what bites you.

HTH,
  jules






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

_______________________________________________
orbit-list mailing list
orbit-list@...
http://mail.gnome.org/mailman/listinfo/orbit-list