Hello community, here is the log from the commit of package NetworkManager for openSUSE:Factory checked in at 2019-03-26 15:37:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/NetworkManager (Old) and /work/SRC/openSUSE:Factory/.NetworkManager.new.25356 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "NetworkManager" Tue Mar 26 15:37:46 2019 rev:195 rq:687769 version:1.16.0 Changes: -------- --- /work/SRC/openSUSE:Factory/NetworkManager/NetworkManager.changes 2019-03-22 14:57:41.721937245 +0100 +++ /work/SRC/openSUSE:Factory/.NetworkManager.new.25356/NetworkManager.changes 2019-03-26 15:37:48.512363081 +0100 @@ -1,0 +2,16 @@ +Thu Mar 21 12:04:23 UTC 2019 - Antonio Larrosa <[email protected]> + +- Fix the connectivity value of devices which was set to LIMITED when + the connectivity check fails. Now if the connectivity is being set + to LIMITED but the device state is DISCONNECTED, then the value is + coerced to NONE. Add patch submitted to + upstream (boo#1103678, glfdo#NetworkManager/NetworkManager#138): + * 0001-Coerce-connectivity-LIMITED-to-NONE-when-device-is-d.patch + +- Fix the global connectivity value which wasn't updated when a + device was removed. Which is a problem if the device being removed + is the one providing the connectivity. Add patch submitted to + upstream (boo#1103678, glfdo#NetworkManager/NetworkManager#141): + * 0001-Update-connectivity-value-on-device-removal.patch + +------------------------------------------------------------------- New: ---- 0001-Coerce-connectivity-LIMITED-to-NONE-when-device-is-d.patch 0001-Update-connectivity-value-on-device-removal.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ NetworkManager.spec ++++++ --- /var/tmp/diff_new_pack.6zNa2G/_old 2019-03-26 15:37:49.772362580 +0100 +++ /var/tmp/diff_new_pack.6zNa2G/_new 2019-03-26 15:37:49.772362580 +0100 @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -46,6 +46,10 @@ Patch4: nm-dont-overwrite-resolv-conf.patch # PATCH-FIX-OPENSUSE NetworkManager-1.10.6-netconfig.patch boo#1092352 -- Don't return SR_NOTFOUND if netconfig fails to launch Patch5: NetworkManager-1.10.6-netconfig.patch +# PATCH-FIX-UPSTREAM 0001-Coerce-connectivity-LIMITED-to-NONE-when-device-is-d.patch boo#1103678 +Patch6: 0001-Coerce-connectivity-LIMITED-to-NONE-when-device-is-d.patch +# PATCH-FIX-UPSTREAM 0001-Update-connectivity-value-on-device-removal.patch boo#1103678 +Patch7: 0001-Update-connectivity-value-on-device-removal.patch BuildRequires: dnsmasq BuildRequires: fdupes @@ -235,6 +239,8 @@ #patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 +%patch7 -p1 %build NOCONFIGURE=1 ./autogen.sh ++++++ 0001-Coerce-connectivity-LIMITED-to-NONE-when-device-is-d.patch ++++++ >From 3e53521b50b7150118fbb729def0a2a1364c5aae Mon Sep 17 00:00:00 2001 From: Antonio Larrosa <[email protected]> Date: Thu, 21 Mar 2019 11:08:36 +0100 Subject: [PATCH] Coerce connectivity "LIMITED" to "NONE" when device is disconnected If the device is disconnected it can't have any connectivity, so we can set it to NONE instead of LIMITED. Fixes #138 --- src/devices/nm-device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 7514fa784..48279c4ec 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -2821,7 +2821,8 @@ concheck_update_state (NMDevice *self, int addr_family, state = NM_CONNECTIVITY_LIMITED; } else state = NM_CONNECTIVITY_NONE; - } + } else if (state == NM_CONNECTIVITY_LIMITED && priv->state <= NM_DEVICE_STATE_DISCONNECTED) + state = NM_CONNECTIVITY_NONE; if (priv->concheck_x[IS_IPv4].state == state) { /* we got a connectivty update, but the state didn't change. If we were probing, -- 2.21.0 ++++++ 0001-Update-connectivity-value-on-device-removal.patch ++++++ >From c8e9393a4e821673c273e5bf7a4393f17d29655b Mon Sep 17 00:00:00 2001 From: Antonio Larrosa <[email protected]> Date: Thu, 21 Mar 2019 11:32:32 +0100 Subject: [PATCH] Update connectivity value on device removal When a device is removed (like when the user unplugs a usb network device) the device object is removed, so it doesn't emit a notify signal for a change in its connectivity and so, device_connectivity_changed is not called. This means that nobody updates the global connectivity value which is potentially wrong if the device was the one providing network connectivity. Since device_connectivity_changed's first two parameters aren't actually used and are there just for the signal to be able to be connected, I moved the code from device_connectivity_changed to a new update_connectivity_value function that just takes a NMManager parameter and also call it from remove_device. Fixes #141 --- src/nm-manager.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/nm-manager.c b/src/nm-manager.c index 0bf6a7510..f5608770e 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -303,6 +303,8 @@ static const GDBusSignalInfo signal_info_state_changed; static const GDBusSignalInfo signal_info_device_added; static const GDBusSignalInfo signal_info_device_removed; +static void update_connectivity_value (NMManager *self); + static gboolean add_device (NMManager *self, NMDevice *device, GError **error); static void _emit_device_added_removed (NMManager *self, @@ -1700,6 +1702,8 @@ remove_device (NMManager *self, g_signal_emit (self, signals[INTERNAL_DEVICE_REMOVED], 0, device); _notify (self, PROP_ALL_DEVICES); + update_connectivity_value(self); + nm_dbus_object_clear_and_unexport (&device); check_if_startup_complete (self); @@ -2923,6 +2927,12 @@ static void device_connectivity_changed (NMDevice *device, GParamSpec *pspec, NMManager *self) +{ + update_connectivity_value(self); +} + +static void +update_connectivity_value (NMManager *self) { NMManagerPrivate *priv = NM_MANAGER_GET_PRIVATE (self); NMConnectivityState best_state; -- 2.21.0
