List Info

Thread: Non-local IPv4 communication disabled in 2.14.3




Non-local IPv4 communication disabled in 2.14.3
user name
2006-09-09 07:35:51
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  <coldingomesc.com>
+
+	* src/linc-connection.c (link_connection_do_initiate):
Remove code
+	that disabled any non-local IPv4 connection.
+
 2006-06-23  Tor Lillqvist  <tmlnovell.com>
 
 	* 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
orbit-listgnome.org
htt
p://mail.gnome.org/mailman/listinfo/orbit-list
Non-local IPv4 communication disabled in 2.14.3
user name
2006-09-09 07:42:25
lö 2006-09-09 klockan 09:35 +0200 skrev Jules Colding:

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

Good, this then verifies what my eyes saw but I was to lazy
to actually
test ;)

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

Please do, and resolve bug #354950 while at it.

--tml


_______________________________________________
orbit-list mailing list
orbit-listgnome.org
htt
p://mail.gnome.org/mailman/listinfo/orbit-list
Non-local IPv4 communication disabled in 2.14.3
user name
2006-09-09 07:56:47
On Sat, 2006-09-09 at 10:42 +0300, Tor Lillqvist wrote:
> lö 2006-09-09 klockan 09:35 +0200 skrev Jules Colding:
> 
> > 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.
> 
> Good, this then verifies what my eyes saw but I was to
lazy to actually
> test ;)
> 
> > This patch fixes the problem. I'll commit shortly
unless someone
> > objects.
> 
> Please do, and resolve bug #354950 while at it.

Done, but I don't have the rights to resolve the bug. Could
you please
do it?

Thanks,
  jules


> --tml
> 

_______________________________________________
orbit-list mailing list
orbit-listgnome.org
htt
p://mail.gnome.org/mailman/listinfo/orbit-list
Non-local IPv4 communication disabled in 2.14.3
user name
2006-09-09 08:07:36
lö 2006-09-09 klockan 09:56 +0200 skrev Jules Colding:

> Done, but I don't have the rights to resolve the bug.
Could you please
> do it?

Oh, OK.

--tml


_______________________________________________
orbit-list mailing list
orbit-listgnome.org
htt
p://mail.gnome.org/mailman/listinfo/orbit-list
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )