rpms/gnome-vfs2/devel gnome-vfs-2.16.2-ipv6-link-local.patch, NONE, 1.1 gnome-vfs2.spec, 1.150, 1.151

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Mar 7 13:48:00 UTC 2007


Author: alexl

Update of /cvs/dist/rpms/gnome-vfs2/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv26928

Modified Files:
	gnome-vfs2.spec 
Added Files:
	gnome-vfs-2.16.2-ipv6-link-local.patch 
Log Message:
* Wed Mar  7 2007 Alexander Larsson <alexl at redhat.com> - 2.17.91-2
- Handle ipv6 link-local addresses better in network:/// (#212565)



gnome-vfs-2.16.2-ipv6-link-local.patch:
 gnome-vfs-dns-sd.c |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

--- NEW FILE gnome-vfs-2.16.2-ipv6-link-local.patch ---
--- gnome-vfs-2.16.2/libgnomevfs/gnome-vfs-dns-sd.c.ipv6	2006-11-30 13:40:48.000000000 +0100
+++ gnome-vfs-2.16.2/libgnomevfs/gnome-vfs-dns-sd.c	2006-11-30 14:28:48.000000000 +0100
@@ -1959,6 +1959,7 @@
 struct sync_resolve_data {
 	AvahiSimplePoll *poll;
 	gboolean got_data;
+	gboolean got_link_local_ipv6;
 	char *host;
 	int port;
 	char *text;
@@ -1997,6 +1998,13 @@
 
 	data = user_data;
 	if (event == AVAHI_RESOLVER_FOUND) {
+		if (address->proto == AVAHI_PROTO_INET6 &&
+		    address->data.ipv6.address[0] == 0xfe &&
+		    address->data.ipv6.address[1] == 0x80) {
+			data->got_link_local_ipv6 = TRUE;
+			goto out;
+		}
+
 		data->got_data = TRUE;
 		avahi_address_snprint (a, sizeof(a), address);
 		data->host = g_strdup (a);
@@ -2005,7 +2013,7 @@
 		data->text = g_malloc (data->text_len);
 		avahi_string_list_serialize (txt, data->text, data->text_len);
 	}
-	
+ out:
 	avahi_service_resolver_free (r);
         avahi_simple_poll_quit (data->poll);
 }
@@ -2090,8 +2098,13 @@
 		AvahiClient *client = NULL;
 		AvahiServiceResolver *sr;
 		int error;
+		AvahiProtocol protocol;
 		struct sync_resolve_data resolve_data = {0};
 
+		protocol = AVAHI_PROTO_UNSPEC;
+
+	retry:
+
 		simple_poll = avahi_simple_poll_new ();
 		resolve_data.poll = simple_poll;
 		if (simple_poll == NULL) {
@@ -2109,7 +2122,8 @@
 			return GNOME_VFS_ERROR_GENERIC;
 		}
 		
-		sr = avahi_service_resolver_new (client, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 
+		resolve_data.got_link_local_ipv6 = FALSE;
+		sr = avahi_service_resolver_new (client, AVAHI_IF_UNSPEC, protocol, 
 						 name, type, domain, AVAHI_PROTO_UNSPEC, 
 						 0, avahi_resolve_sync_callback, &resolve_data);
 		if (sr == NULL) {
@@ -2127,6 +2141,14 @@
 		avahi_client_free (client);
 		avahi_simple_poll_free (simple_poll);
 
+
+		if (resolve_data.got_link_local_ipv6) {
+			/* We ignore non-routable ipv6 link-local addresses here, because our
+			   api doesn't give the iface, so they are useless. Prefer ipv4 address instead */
+			protocol = AVAHI_PROTO_INET;
+			goto retry;
+		}
+
 		if (resolve_data.got_data) {
 			*host = resolve_data.host;
 			*port = resolve_data.port;


Index: gnome-vfs2.spec
===================================================================
RCS file: /cvs/dist/rpms/gnome-vfs2/devel/gnome-vfs2.spec,v
retrieving revision 1.150
retrieving revision 1.151
diff -u -r1.150 -r1.151
--- gnome-vfs2.spec	13 Feb 2007 04:52:22 -0000	1.150
+++ gnome-vfs2.spec	7 Mar 2007 13:47:58 -0000	1.151
@@ -14,7 +14,7 @@
 Summary: The GNOME virtual file-system libraries
 Name: gnome-vfs2
 Version: 2.17.91
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: LGPL
 Group: System Environment/Libraries
 Source0: http://ftp.gnome.org/pub/gnome/source/gnome-vfs/2.17/gnome-vfs-%{version}.tar.bz2
@@ -69,6 +69,10 @@
 # http://bugzilla.gnome.org/show_bug.cgi?id=356772
 Patch8: gnome-vfs-2.16.0-no-dbus.patch
 
+# We broke network: on link-local ipv6 addresses (#212565)
+Patch9: gnome-vfs-2.16.2-ipv6-link-local.patch
+
+
 %description
 GNOME VFS is the GNOME virtual file system. It is the foundation of
 the Nautilus file manager. It provides a modular architecture and
@@ -121,6 +125,8 @@
 
 %patch8 -p1 -b .no-dbus
 
+%patch9 -p1 -b .ipv6
+
 %build
 
 if pkg-config openssl ; then
@@ -223,6 +229,9 @@
 %config %{_sysconfdir}/gnome-vfs-2.0/modules/smb-module.conf
 
 %changelog
+* Wed Mar  7 2007 Alexander Larsson <alexl at redhat.com> - 2.17.91-2
+- Handle ipv6 link-local addresses better in network:/// (#212565)
+
 * Mon Feb 12 2007 Matthias Clasen <mclasen at redhat.com> - 2.17.91-1
 - Update to 2.17.91
 




More information about the fedora-cvs-commits mailing list