From 22d2f571ce77f78d78a131c8df7fcbcf265b4137 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 2 May 2013 14:39:51 -0500 Subject: [PATCH] core: ensure ActiveConnections are torn down when device is unavailable (bgo #676285) If a device becomes unmanaged or unavailable (eg, due to loss of carrier, becoming unmanaged, rfkilled, supplicant crashing, etc), the ActiveConnection would simply set state to UNKNOWN and the Manager wouldn't tear it down and remove it from the ActiveConnections property list. Instead, these states should be treated the same as if the device was deactivated cleanly so that the AC will accurately reflect the device state and the Manager will clean the AC up. Fixes comment #12 in: https://bugzilla.gnome.org/show_bug.cgi?id=676285 --- src/nm-activation-request.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nm-activation-request.c b/src/nm-activation-request.c index 76949cf279..e17f2a7e80 100644 --- a/src/nm-activation-request.c +++ b/src/nm-activation-request.c @@ -318,6 +318,8 @@ device_state_changed (NMDevice *device, GParamSpec *pspec, NMActRequest *self) break; case NM_DEVICE_STATE_FAILED: case NM_DEVICE_STATE_DISCONNECTED: + case NM_DEVICE_STATE_UNMANAGED: + case NM_DEVICE_STATE_UNAVAILABLE: ac_state = NM_ACTIVE_CONNECTION_STATE_DEACTIVATED; /* No longer need to pay attention to device state */