Hi,

Code was introduced into 2.14.3 that checked for host and local_host
having the same inet_addr. This effectively disabled all non-local
communications.

This patch fixes the problem. I'll commit shortly unless someone
objects.

Best regards,
  jules


Index: linc2/ChangeLog
===================================================================
RCS file: /cvs/gnome/ORBit2/linc2/ChangeLog,v
retrieving revision 1.260
diff -u -p -r1.260 ChangeLog
--- linc2/ChangeLog     23 Jun 2006 19:44:21 -0000      1.260
+++ linc2/ChangeLog     9 Sep 2006 07:28:18 -0000
@@ -1,3 +1,8 @@
+2006-09-09  Jules Colding  <[EMAIL PROTECTED]>
+
+       * src/linc-connection.c (link_connection_do_initiate): Remove code
+       that disabled any non-local IPv4 connection.
+
 2006-06-23  Tor Lillqvist  <[EMAIL PROTECTED]>
 
        * src/linc-protocols.c (link_protocol_get_sockinfo_ipv4): In the
Index: linc2/src/linc-connection.c
===================================================================
RCS file: /cvs/gnome/ORBit2/linc2/src/linc-connection.c,v
retrieving revision 1.116
diff -u -p -r1.116 linc-connection.c
--- linc2/src/linc-connection.c 7 Sep 2006 00:14:52 -0000       1.116
+++ linc2/src/linc-connection.c 9 Sep 2006 07:28:19 -0000
@@ -495,27 +495,6 @@ link_connection_from_fd (LinkConnection 
        CNX_UNLOCK (cnx);
 }
 
-static unsigned long
-get_inet_addr (const char *str)
-{
-        struct hostent *hp;
-        struct in_addr *addr_ptr;
-        unsigned long addr;
-
-        if (isdigit (*str)) {
-                        addr = inet_addr (str);
-                } else {
-                        if ((hp = gethostbyname (str)) != NULL) {
-
-                                addr_ptr = (struct in_addr *) hp->h_addr;
-
-                                addr = inet_addr (inet_ntoa (*addr_ptr));
-                        }
-                }
-
-        return addr;
-}
-
 static gboolean
 link_connection_do_initiate (LinkConnection        *cnx,
                             const char            *proto_name,
@@ -534,25 +513,6 @@ link_connection_do_initiate (LinkConnect
 
        if (!proto)
                return FALSE;
-
-       if (host &&
-#ifdef G_OS_WIN32
-           (strcmp (host, "127.0.0.1") != 0) &&
-#endif
-           (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;
-               }
-       }
 
        saddr = link_protocol_get_sockaddr (
                proto, host, service, &saddr_len);


_______________________________________________
orbit-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/orbit-list

Reply via email to