Martin Steigerwald wrote:
> Am Mittwoch 17 Dezember 2008 schrieb Michael Biebl:
>> Martin Steigerwald wrote:
>>> Hi!
>>>
>>> There is already an upstream bug report for this:
>>>
>>> http://bugzilla.gnome.org/show_bug.cgi?id=418745
>>>
>>> Upstream doesn't seem to be interested in fixing false network online
>>> status reports or even deleting default routes in that case. NM
>>> didn't do the later here yet tough.
>> I agree, that this situation is less than ideal (and thanks for the
>> nice writeup). With 0.7 the situation will be better, as NM can handle
>> more different use case (static ip etc.), but the underlying problem
>> still exists.
>>
>> A short term fix could be, to assume the network status to be "online"
>> for unmanaged devices, rather than offline. This way apps wouldn't go
>> into offline mode. What you will get though eventually, is unsuccessful
>> network connection attempts (but that wouldn't be a regression with
>> regard to old ifupdown).
>>
>> Ubuntu ships a patch for exactly that, and I could pull it from there
> 
> Sounds like a plan! Currently I just disabled Network Manager altogether. 
> I just use it when I use wifi and at home and work I have port 
> replicators for my ThinkPads.

Attached is the patch from Ubuntu (for 0.6.6) I was talking about.

Care to give it a try?

If we want to get it into lenny, I'd have to prepare an upload rsn.

Michael

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
diff -Nur bzr.debian.0.9.5/src/NetworkManagerDbus.c bzr.debian.0.9.5.new/src/NetworkManagerDbus.c
--- bzr.debian.0.9.5/src/NetworkManagerDbus.c	2007-06-25 17:38:42.000000000 +0200
+++ bzr.debian.0.9.5.new/src/NetworkManagerDbus.c	2007-06-25 17:38:42.000000000 +0200
@@ -302,6 +302,9 @@
 	if (data->asleep == TRUE)
 		return NM_STATE_ASLEEP;
 
+	if (data->always_online == TRUE)
+	  return NM_STATE_CONNECTED;
+
 	act_dev = nm_get_active_device (data);
 	if (!act_dev && !data->modem_active)
 		return NM_STATE_DISCONNECTED;
diff -Nur bzr.debian.0.9.5/src/NetworkManagerMain.h bzr.debian.0.9.5.new/src/NetworkManagerMain.h
--- bzr.debian.0.9.5/src/NetworkManagerMain.h	2007-06-25 17:18:17.000000000 +0200
+++ bzr.debian.0.9.5.new/src/NetworkManagerMain.h	2007-06-25 17:38:42.000000000 +0200
@@ -86,6 +86,7 @@
 	gboolean				modem_active;
 	gboolean				asleep;
 	gboolean				disconnected;
+	gboolean                                always_online;
 
 	GSList *				dialup_list;
 	GMutex *				dialup_list_mutex;
diff -Nur bzr.debian.0.9.5/src/nm-device.c bzr.debian.0.9.5.new/src/nm-device.c
--- bzr.debian.0.9.5/src/nm-device.c	2007-06-25 17:38:42.000000000 +0200
+++ bzr.debian.0.9.5.new/src/nm-device.c	2007-06-25 17:38:42.000000000 +0200
@@ -195,6 +195,8 @@
 	/* Allow distributions to flag devices as disabled */
 	if (nm_system_device_get_disabled (dev))
 	{
+		/* In this case, we assume we're always online */
+		app_data->always_online = TRUE;
 		g_object_unref (G_OBJECT (dev));
 		return NULL;
 	}

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to