diff options
| author | Michael Biebl <biebl@debian.org> | 2016-11-25 12:53:46 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2016-11-25 12:53:46 +0100 |
| commit | 3d4d73c6917c37b21b88c4740a9455193a5e9e82 (patch) | |
| tree | f6a8a8ead06a25b040184c627efd0865392060e9 | |
| parent | de76cf2b7d559e0ac0558d82641003f678c54563 (diff) | |
Cherry-pick a few fixes from upstream as requested by andrewsh
* Notify the AccessPoint change after an AP is removed. Patch cherry-picked from upstream Git. * Fix state transition on resuming from sleep so we don't end up with unmanaged devices. Patch cherry-picked from upstream Git.
| -rw-r--r-- | debian/changelog | 10 | ||||
| -rw-r--r-- | debian/patches/manager-fix-state-transition-on-resuming-from-sleep.patch | 54 | ||||
| -rw-r--r-- | debian/patches/series | 2 | ||||
| -rw-r--r-- | debian/patches/wifi-notify-the-AccessPoint-change-after-an-AP-is-removed.patch | 35 |
4 files changed, 101 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 9c9b8c2f..4f804fa4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +network-manager (1.4.2-3) UNRELEASED; urgency=medium + + * Notify the AccessPoint change after an AP is removed. + Patch cherry-picked from upstream Git. + * Fix state transition on resuming from sleep so we don't end up with + unmanaged devices. + Patch cherry-picked from upstream Git. + + -- Michael Biebl <biebl@debian.org> Fri, 25 Nov 2016 12:48:02 +0100 + network-manager (1.4.2-2) unstable; urgency=medium * Drop Build-Depends on dh-systemd, no longer necessary with debhelper 10. diff --git a/debian/patches/manager-fix-state-transition-on-resuming-from-sleep.patch b/debian/patches/manager-fix-state-transition-on-resuming-from-sleep.patch new file mode 100644 index 00000000..b2b6b27b --- /dev/null +++ b/debian/patches/manager-fix-state-transition-on-resuming-from-sleep.patch @@ -0,0 +1,54 @@ +From: Beniamino Galvani <bgalvani@redhat.com> +Date: Wed, 16 Nov 2016 11:46:29 +0100 +Subject: manager: fix state transition on resuming from sleep + +When going to sleep, we unmanage devices setting the unmanaged flags +immediately but delaying the state transition (because we do it from +another state transition). The signal handler can be executed after +the wake and, especially, after we have already re-managed the device, +making the device unmanaged again. + +Detect such situation and force the state to UNMANAGED (which will +also clear any pending state change), so that later we manage the +device again and it will try to activate any available connection. + +Fixes: 81ea812362de2757979e2c675774fc445400c59f +(cherry picked from commit 3cc06c3db679c1ff2f61a301396393300d36adbb) +--- + src/nm-manager.c | 16 +++++++++++++--- + 1 file changed, 13 insertions(+), 3 deletions(-) + +diff --git a/src/nm-manager.c b/src/nm-manager.c +index 4d222b6..186411e 100644 +--- a/src/nm-manager.c ++++ b/src/nm-manager.c +@@ -4092,16 +4092,26 @@ do_sleep_wake (NMManager *self, gboolean sleeping_changed) + + if (waking_from_suspend) { + sleep_devices_clear (self); +- /* Belatedly take down Wake-on-LAN devices; ideally we wouldn't have to do this +- * but for now it's the only way to make sure we re-check their connectivity. +- */ + for (iter = priv->devices; iter; iter = iter->next) { + NMDevice *device = iter->data; + + if (nm_device_is_software (device)) + continue; ++ ++ /* Belatedly take down Wake-on-LAN devices; ideally we wouldn't have to do this ++ * but for now it's the only way to make sure we re-check their connectivity. ++ */ + if (device_is_wake_on_lan (device)) + nm_device_set_unmanaged_by_flags (device, NM_UNMANAGED_SLEEPING, TRUE, NM_DEVICE_STATE_REASON_SLEEPING); ++ ++ /* Check if the device is unmanaged but the state transition is still pending. ++ * If so, change state now so that later we re-manage the device forcing a ++ * re-check of available connections. ++ */ ++ if ( !nm_device_get_managed (device, FALSE) ++ && nm_device_get_state (device) != NM_DEVICE_STATE_UNMANAGED) { ++ nm_device_state_changed (device, NM_DEVICE_STATE_UNMANAGED, NM_DEVICE_STATE_REASON_SLEEPING); ++ } + } + } + diff --git a/debian/patches/series b/debian/patches/series index 140a0339..5c1b2a36 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,5 @@ fix-arping-path.patch Don-t-make-NetworkManager-D-Bus-activatable.patch systemd-Don-t-enable-NetworkManager-wait-online.service-s.patch Fix-iscsiadm-path.patch +manager-fix-state-transition-on-resuming-from-sleep.patch +wifi-notify-the-AccessPoint-change-after-an-AP-is-removed.patch diff --git a/debian/patches/wifi-notify-the-AccessPoint-change-after-an-AP-is-removed.patch b/debian/patches/wifi-notify-the-AccessPoint-change-after-an-AP-is-removed.patch new file mode 100644 index 00000000..6d775908 --- /dev/null +++ b/debian/patches/wifi-notify-the-AccessPoint-change-after-an-AP-is-removed.patch @@ -0,0 +1,35 @@ +From: Lubomir Rintel <lkundrak@v3.sk> +Date: Wed, 16 Nov 2016 16:22:59 +0100 +Subject: wifi: notify the AccessPoint change after an AP is removed + +Otherwise its path remains visible on D-Bus despite the object is gone, +making libnm sad and grumpy: + + libnm-WARNING **: no object known for /org/freedesktop/NetworkManager/AccessPoint/666 + +(cherry picked from commit d0c01cc79daf62b83e52eea4d6302ddc42f1f5f0) +--- + src/devices/wifi/nm-device-wifi.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c +index f97e668..32737b3 100644 +--- a/src/devices/wifi/nm-device-wifi.c ++++ b/src/devices/wifi/nm-device-wifi.c +@@ -478,7 +478,6 @@ ap_add_remove (NMDeviceWifi *self, + } + + g_signal_emit (self, signals[signum], 0, ap); +- _notify (self, PROP_ACCESS_POINTS); + + if (signum == ACCESS_POINT_REMOVED) { + g_hash_table_remove (priv->aps, nm_exported_object_get_path ((NMExportedObject *) ap)); +@@ -486,6 +485,8 @@ ap_add_remove (NMDeviceWifi *self, + g_object_unref (ap); + } + ++ _notify (self, PROP_ACCESS_POINTS); ++ + nm_device_emit_recheck_auto_activate (NM_DEVICE (self)); + if (recheck_available_connections) + nm_device_recheck_available_connections (NM_DEVICE (self)); |